Hi.
I’m trying to make an indicator to plot on some last bars. The code is like this:
Code: Select all
if ( Bars.CurrentBar >= Bars.FullSymbolData.Count - 34 )
This should plot on the last 34 bars. I have to increase 34 to 377 or something like that to make something happen. (So the count of Bars.FullSymbolData.Count is actually more than the true amount of bars.)
These two should be the same, but aren’t:
Code: Select all
if ( Bars.CurrentBar >= Bars.FullSymbolData.Count )
if (Bars.LastBarOnChart)
Am I missing something, or is there a way to get the right count of the bars on a chart?