Hi, I am unclear why I am getting this error.
I have tried various solutions from this forum (setting roundlot, turning position size shrinking on).
SetBacktestMode(backtestRotational);
SetOption("FuturesMode" ,False);
SetOption("MinShares",1);
SetOption("ActivateStopsImmediately", True);
SetOption("AllowSameBarExit", True);
SetOption( "MarginRequirement", 100);
SetOption("MinPosValue", 0);
SetOption("AllowPositionShrinking", True);
SetOption("PriceBoundChecking", True);
SetOption("UsePrevBarEquityForPosSizing", True);
SetOption("AccountMargin", 100);
SetOption("ReverseSignalForcesExit", False);
SetOption("HoldMinBars", 1);
RoundLotSize = 1;
AMAT is not entered when the buyprice is 16.171 and there is $24228.67 of equity available.