the following code is simple and straighforward. But there is always an error saying "Strategy 'MyCandleStopInStopOut': Error on calling 'OnBarUpdate' method on bar 20: Index was outside the bounds of the array." Does anybody know why ? And the error seems to be from bar 20 onward.
Thanks !
if (CurrentBar < 20)
return;
if (Close[1] > Open[1] && Value[0] > High[1]
EnterLong(1, "Long Entry");

Comment