There is the built-in complex criterion which is prepared for you by MQ and which includes multiple important metrics at once, so probably you don't need the custom criterion at all.
From my experience a suitable quality is provided by R2-metric, implemented in the algotrading book (RSquared.mqh is available in the code base).
Of course, you can implement it as you wish, say - sqrt(TesterStatistics(STAT_PROFIT)) * sqrt(TesterStatistics(STAT_TRADES)).
- www.mql5.com
Thanks for your time
I have tested the complex criterion and it doesnt give me good profitable results, over optimized setups instead. That's why I am looking for a code that can allow the custom criterion to class the passes according to gains/number of trades ration or something lik that.
MM
About the code ou tell me to enter, is that the only thing I have to do in the code, does it depends of the variables of my EA ?
About the code ou tell me to enter, is that the only thing I have to do in the code, does it depends of the variables of my EA ?
- 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 everyone,
I’d like to know how to properly configure a Custom max criterion for the fast genetic-based optimization in MT5.
My goal is to optimize my EA according to the gains and the number of trades, in order to achieve more reliable and consistent results.
When I use the standard “Maximum balance” criterion, I often get configurations showing huge profits but they’re not reliable since the number of trades is extremely low.
As the selected criterion directly affects how the fast genetic algorithm performs its search, I’d like to understand how to customize this criterion (for example, by combining total profit and number of trades) using the Custom max option.
Thanks a lot in advance
MM