I am trying to use BarsSinceEntry() to manage a scaled into position in a multi-timeframe strategy on NT 6.5. I’m having some problems with the relevant positioning of the entriesAgo in the BarsSinceEntry() function.
I am trying to track the number of bars the “original” position has been in for. The strategy could scale into a number of positions. What is the right way to do this? When I get a number of positions in, there appears to be a referencing problem with BarsSinceEntry(). I do suspect it is my logic in that I’m not using the function correctly.
The code is as follows:
int tempbars;
int numPos = 0;
if (pos_counter > 1)
numPos = pos_counter - 1;
if (pos_counter > 1) {
tempbars = BarsSinceEntry(0, "Short Entry", numPos);
} else {
tempbars = BarsSinceEntry(0, "Short Entry", 0);
}
Thanks in advance.
Dan

Comment