Hi all,
I want to use the strategy tester to perform a Monte Carlo sensitivity analysis of an optimum Set of variables already obtained with the fast optimization. I wanted to start from the optimum set, and perform 10,000 simulations with random perturbations around the parameter's optimum values. I would use a single parameter which will go from 0 to 9999, the other parameters would be changed using ParameterSetRange(...), and I would use the "slow" optimization to get all 10k sims. Then I would post-process the 10k simulations to do the sensitivity analysis. The problem I find is that the OnTesterIni(t) (where I could set the perturbed parameters I want using ParameterSetRange) won't work because it is called only once at the beginning of the Strategy Tester.
My question is: Is there a way to set the input parameters I want for each separate pass of the optimization? Could you give me a lead on how? Any MQL5 function that would help?
The articles about Monte Carlo in the Forum don't address this.
thank you
There is no standard way to do that. The only solution is to manage your parameters internally in the EA code.
There is no standard way to do that. The only solution is to manage your parameters internally in the EA code.
Thank you Alain.
could you give me a hint on "manage your parameters internally in the EA code"?
If I set new values for my parameters internally, how do I tell the optimizer to use such new values for each simulation?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
I want to use the strategy tester to perform a Monte Carlo sensitivity analysis of an optimum Set of variables already obtained with the fast optimization. I wanted to start from the optimum set, and perform 10,000 simulations with random perturbations around the parameter's optimum values. I would use a single parameter which will go from 0 to 9999, the other parameters would be changed using ParameterSetRange(...), and I would use the "slow" optimization to get all 10k sims. Then I would post-process the 10k simulations to do the sensitivity analysis. The problem I find is that the OnTesterIni(t) (where I could set the perturbed parameters I want using ParameterSetRange) won't work because it is called only once at the beginning of the Strategy Tester.
My question is: Is there a way to set the input parameters I want for each separate pass of the optimization? Could you give me a lead on how? Any MQL5 function that would help?
The articles about Monte Carlo in the Forum don't address this.
thank you