Yes, but only if you have the source code for the EA. You would then code your own criterion and return the value via the the OnTester() function ...
Return Value
Value of the custom criterion optimization for assessing test results.
Note
The OnTester() function can be used only when testing EAs and is intended primarily for the calculation of a value that is used as a 'Custom max' criterion when optimizing input parameters.
During the genetic optimization, sorting results within one generation is performed in descending order. This means that the results with the highest value are deemed the best from the optimization criterion point of view. The worst values for such sorting are placed at the end and are subsequently discarded. Therefore, they do not take part in forming the next generation.
Thus, the OnTester() function allows you not only to create and save your own test results reports, but also control the optimization process to find the best parameters of the trading strategy.
- www.mql5.com
Yes, but only if you have the source code for the EA. You would then code your own criterion and return the value via the the OnTester() function ...
Return Value
Value of the custom criterion optimization for assessing test results.
Note
The OnTester() function can be used only when testing EAs and is intended primarily for the calculation of a value that is used as a 'Custom max' criterion when optimizing input parameters.
During the genetic optimization, sorting results within one generation is performed in descending order. This means that the results with the highest value are deemed the best from the optimization criterion point of view. The worst values for such sorting are placed at the end and are subsequently discarded. Therefore, they do not take part in forming the next generation.
Thus, the OnTester() function allows you not only to create and save your own test results reports, but also control the optimization process to find the best parameters of the trading strategy.
Hello and thanks,
yes, it is my own EA, so - I have the source code ...
I would know how to calculate my own KPI and do this in the "OnTester" function.
Question: what is the specific "command" that makes this appear in the optimiser?
is there some example code?
I did see example code in an article, but in this case it referred to other Parameters, which are already used in Optimisation.
In my example, I would like to use other parameters, which are not yet part of the optimiser.
Thanks in advance.
I already gave you the answer and even highlighted it for you in the previous post (please read the OnTester() documentation) ...
- The OnTester() function can be used only when testing EAs and is intended primarily for the calculation of a value that is used as a 'Custom max' criterion when optimizing input parameters.
- www.mql5.com
I already gave you the answer and even highlighted it for you in the previous post (please read the OnTester() documentation) ...
- The OnTester() function can be used only when testing EAs and is intended primarily for the calculation of a value that is used as a 'Custom max' criterion when optimizing input parameters.
okay, thanks, I will read it!!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, this is about using the optimiser function. There is a number of parameters by which the optimisation can be done.
I have seen that there is also the "custom max" criterion. But my interpretation of this is, that is just another way of how to combine the other parameters.
My intention is to set up my own KPI as part of the optimisation. In particular I would like to see the "win rate". So I could count the number of trades and the number of winning trades.
My question here is if something like this is possible at all, or is it not foreseen in the framework?
Thanks a lot for your advice.