Error on calling 'OnBarUpdate' method on bar 21: Index was outside the bounds of the array.
if (CurrentBars[0] <= BarsRequiredToTrade)
return;
Value[0] = Input[0] + (CurrentBar > 0 ? Value[1] : 0) - (CurrentBar >= Period ? Input[Period] : 0);
if ( Value[0] > Value[1] )
EnterLong();
else if (Value[0] < Value[1] )
EnterShort();
Comment