When optimizing a strategy I get the error:
"Strategy 'TestStrategy': Error on calling 'OnBarUpdate' method on bar 63: 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."
If the strategy is executing the 63th bar, why it says "when there are only 4 bars on the chart"?
Thanks
Comment