_SECTION_BEGIN(“Back Testing”);
//=======================================================================================
//Back Testing
//=======================================================================================
SetTradeDelays(0,0,0,0);
SetOption(“UsePrevBarEquityForPosSizing”,True);
Capital = Param(“Initial Equity $”,100000,1000,10000000,100);
SetOption(“InitialEquity”,Capital);
MaxPos = Param(“Maxium Open Positions”,2,1,100,1);
SetOption(“MaxOpenPositions”,MaxPos);
//SetOption(“AllowSamebarExit”,False);
SetOption(“AllowPositionShrinking”,False);
SetOption(“InterestRate”,0);
SetOption(“MinShares”,1);
SetOption(“MinPosValue”,1);
SetOption(“CommissionMode”,0);
SetOption(“CommissionAmount”,0);
SetOption(“AccountMargin”,100);
//SetOption(“ReverseSignalForcesExit”,False);
//SetOption(“MaxOpenLong”,0);
//SetOption(“MaxOpenShort”,0);
PositionScore = mtRandom();
//—————————————————————————————
“”;
“Posiion Sizing Method – “;
PosSizeMethod = ParamList(“Postion Size Method”,”Fixed Fraction %|Fixed $ Risk Amount|Fixed $ Total Position Size|Fixed % of Portfolio Equity”,3);
//Fixed $ Position Size
FDAmount = Param(“Fixed $ Total Position Size”,5000,100,1000000,1);
//Fixed % of Equity
FPAmnt = Param(“Fixed % of Portfolio Equity”,100,1,100,1);
if(PosSizeMethod == “Fixed $ Total Position Size”) SetPositionSize(FDAmount,spsValue);
if(PosSizeMethod == “Fixed % of Portfolio Equity”) SetPositionSize(FPAmnt,spsPercentOfEquity);
//===========================================================================================
_SECTION_END();
Buy = True;
Sell = False;