I'm calling the built-in indicator into my strategy. Sometimes, (not every time) I'm getting the following error message:
if (CurrentBar < 3) return;
if (CurrentBar == 3) { // Determine initial position longPosition = High[0] > High[1]; xp = longPosition ? MAX(High, CurrentBar)[0] : MIN(Low, CurrentBar)[0]; af = Acceleration; Value[0] = xp + (longPosition ? -1 : 1) * ((MAX(High, CurrentBar)[0] - MIN(Low, CurrentBar)[0]) * af); return; } else if (BarsArray[0].BarsType.IsRemoveLastBarSupported && CurrentBar < prevBar) {....
Comment