Indicator 'ATR': Error on calling 'OnBarUpdate' method on bar 0: 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.
Strategy 'Algo1': Error on calling 'OnBarUpdate' method on bar 145: 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.
I am using " if (CurrentBar < X) { return;} " in OnBarUpdate(). Note that the 145 in the output/error log is +1 the value I use for X. I am running the most recent version of NT8 and have tried running this particular strategy on multiple PCs and have the same problem.
Was there an update recently to the ATR indicator maybe or something else because this code used to be able to run the Optimizer without an issue. Or maybe it there some variable persistence issue with the optimizer? I am able to get
Any help diagnosing would be greatly appreciated!
Thanks,
John
Comment