Unclear why I have insufficient funds / wrong possize/value

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.

2022-08-18_10-18

@traderuk99, I suggest to use a spreadsheet to do some calculations.

The initial cash is $11.41 (first line of screenshot).

Calculate how much cash you recover from the sales of DISCA, NVDA, MSFT (you'll will end with approx. $69.550 that only allow 2 full positions at the required 10% of equity ($24228.67 as indicated in the AMAT line) + 1 "shrinked" position for STDL ($21092.75).

So, short story, no more free cash! (As confirmed by the next report line... $5.46)

Thank you beppe - very helpful.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.