How to set dynamic MaxOpenLong/MaxOpenShort


AT=ATR(20);

LongMaxPos= ShortMaxPos= maxpos/2;


SetOption("InitialEquity", 10000000);
SetOption( "MaxOpenPositions", maxpos);
SetOption("MaxOpenLong", LongMaxPos/AT);
SetOption("MaxOpenShort", ShortMaxPos/AT);

SetOption("PriceBoundChecking", False);
SetOption("AllowPositionShrinking", True);
SetOption("DisableRuinStop", True);


//SetPositionSize(Possize * MySpsValue, spsValue);
SetPositionSize(Possize , spsShares);



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