Add(PeriodType.Tick, 1);
The principal chart runs off a 10min chart, but, the printout will show an entry, say, at 7:45:30AM and and exit at 8:00:00AM and a respective BarsSinceEntry equal to 1. Now, between the BarsInProgress referring to the tick data, and the BarsSinceEntry referring to Index 1 in its 1st overload, I would have expected it to return BarsSinceEntry equal to something in the 100's.
Here's the code:
// Breakeven if (MAX(High, BarsSinceEntry(1,"",0))[0] >= Position.AvgPrice + beTrigger*TickSize) { if ((Open[1] > Position.AvgPrice + bePlus*TickSize) && (Open[0] <= Position.AvgPrice + bePlus*TickSize)) { ExitLong(); Print(Time[0].ToString() + " ATR: " + ATR(BarsArray[2], atrPeriod)[1].ToString() + " ATR Ticks: " + atrTicks.ToString() + " ATR Target: " + atrTarget.ToString() + " ExitLongBreakeven " + " HighestBar: " + MAX(High, BarsSinceEntry(1,"",0))[0] + " BarsSinceEntry: " + BarsSinceEntry(1,"",0)); }
I'm sure it's messing with things, what you think?
Thanks!
Comment