Trying to optimize the %equity risk: start at 0.40% and move it up by increments of 0.10% up to 1.00%
below is my partial code
SetOption( "GenerateReport", True ); // if set to false, backtest report will be for 0.4% position risk EH20=EMA(High,20); EL20=EMA(Low,20); Capital=10000000; RiskPerShare=4*(EH20-EL20); PositionRisk =Optimize("PositionRisk" ,0.4 ,0.4,1,0.1); MaxEquity = 5; PctSize = Min ( PositionRisk * BuyPrice / RiskPerShare, MaxEquity ); SetPositionSize( PctSize, spsPercentOfEquity );
After pressing Optimize button, 7 sets of results line came out and Position Risk is starting from 0.4 to 1.0 as expected in the final column.
If I press the backtest button, a trade list and backtest report are generated.
My question is the report is for 1% equity risk, how about other position risk (from0.5% to 0.9%) parameters?
Any AFL code to make it happen and to control which parameter to generate the backtest report ?
(currently only know how to generate two reports separately i.e. 0.4% (min value) and 1% (max value) by "GenerateReport" function
Thanks for the help.