I get the error: "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."
I thought that, like in NT7, this error should solved with the code
if(CurrentBar < MinNumBars)
But in NT8 it continues appering. Trying to fix it MinNumBars is bigger than the highest BarsAgo period. But no success.
Comment