I'm getting a Error on calling 'OnStateChange' method: Index was outside the bounds of the array.
the issue is because of this code.
if (BarsInProgress != 0)
return;
if (CurrentBars[0] < 1)
return;
longEMA = ((Lows[1][2]) < Low[3]) && ((Highs[1][2]) > High[3]);
shortEMA = ((Highs[1][2]) < High[3]) && ((Lows[1][2]) > Low[3]);
it seems to me that there is an issue with "Bar[1] [2] and [3]".
Maybe I'm wrong. What is the solution?
Thanks and Best regards
Tradeer
Comment