I am trying to do a very simple rotational trading backtest where I am
testing using the below code.  However, the position sizing is very
messed up.  For example, I have the initial equity setting set at
$100,000 and the first 8 trade of a series (all with the default of
one position only and Buy/Close delays set at 0) taking positions of
less than $10,000.  I've tried different toggling of the the allow
position size shrinking and use previous bar for position sizing to no
avail. Even fixing position size at a small value doesn't seem to help.

Help! 

A2 and B2 code here

Score = ((A2*.5) + (B2*.5))+10;//add 10 to prevent shorts

SetBacktestMode( backtestRotational );

WRH = Param("Worst Rank Held", 1, 1, 5, 1); 
SetOption("WorstRankHeld",WRH);

HMB = Param("Hold Min Days", 7, 1, 21, 1);//or min bars
SetOption("HoldMinDays", HMB);

PosSize = Param("Position Size", 1, 1, 5, 1 );
//PosSize = Optimize("Position Size", 1, 1, 5, 1 );

SetOption("MaxOpenPositions", Possize ); 
SetPositionSize( 100/PosSize, spsPercentOfEquity ); 
//SetPositionSize( 10000, spsValue ); 

PositionScore = Score;
//ApplyStop( 3, 1, 21, 1, volatile = False, ReEntryDelay = 0 );


Reply via email to