Optimization and backtest report query

Hi everyone,

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.

The optimized default value is used.

See Optimize and Optimization in Backtesting.

Thanks for the reply.

Finally understand why default value is required... backtest report is for default value only

No, backtest report is not generated with default value only in optimization.
You just have to enable full report generation:

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