You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
I'm accessing a custom indicator with a data series in it and trying to reference a previous value using indicator[1]
I have the following code in my bar update method, as well
if((BarsInProgress == 0) && ( CurrentBar > 1))
Comment