2020-08-18 06:23:42:610|3|4|Indicator 'MyTest' Error on calling 'OnBarUpdate' method on bar 42639: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
The indicator works in real time in the last bar.
Trying to above the historical. This is the first line of 'OnBarUpdate' method:
if(CurrentBar < Count-2 ) return;
Any idea whats is happening?
Thank you
Comment