else if (State == State.Configure)
{
AddDataSeries("SPY");
protected override void OnBarUpdate()
{
if (BarsInProgress > 1)
return;
if (CurrentBars[0] < FirstValidValue() || CurrentBars[1] < FirstValidValue() || CurrentBars[2] < FirstValidValue())
return;
CalculateCurrentData();
CPUpdateDataASync();
if (State != State.Realtime)
return;
lock (barUpdate)
{
EntryEngine();
ExitEngine();
}
}
But when we download data for PlayBack - we have error - "ERROR: Strategy Error on calling 'OnBarUpdate' method on bar 1275: 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."
We can't debug with VS and found this error only in trace files.
Please help understand why we have this error in PlayBack?

Comment