"Strategy 'MovingAveragesTest': Error on calling 'OnBarUpdate' method on bar -1: 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've tracked down that it has to do with this code below. For whatever reason it can't seem to access information from 1 bar go?
bool bearS = Highs[3][0] > Opens[3][0] && Highs[2][0] > Opens[2][0] && Highs[1][0] > Opens[1][0] && Close[0] < Opens[1][0]; bool bullS = Lows[3][0] < Opens[3][0] && Lows[2][0] < Opens[2][0] && Lows[1][0] < Opens[1][0] && Close[0] > Opens[1][0];
I'm wondering if I don't have my State == State.Configure or State == State.DataLoaded set up properly.
Right now I have:
else if (State == State.Configure) { AddDataSeries(Data.BarsPeriodType.Minutes, 1); }
Comment