Please check the documentation before posting.
Another option is to use "Complex Criterion max". This is an integral and complex measure of a test pass quality. It measures multiple parameters:
- Number of Deals
- Drawdown
- Recovery Factor
- Expected Payoff
- Sharpe Ratio
I know that page very well. That is NOT an OnTester () code. I am looking for the exact formula (i.e. OnTester () code).
None of the conventional documentation provide the formula.
We would like to know HOW it's calculated.
https://www.metatrader5.com/en/terminal/help/algotrading/optimization_types

- 2020.09.23
- MetaQuotes
- www.metatrader5.com
Another option is to use "Complex Criterion max". This is an integral and complex measure of a test pass quality. It measures multiple parameters:
- Number of Deals
- Drawdown
- Recovery Factor
- Expected Payoff
- Sharpe Ratio
The cryptic "complex criterion" gives some strange results.
All parameters are better in the second line, still the complex criterion value is better for a pass with a loss of -6000 !

- 2022.01.16
- www.mql5.com
The cryptic "complex criterion" gives some strange results.
All parameters are better in the second line, still the complex criterion value is better for a pass with a loss of -6000 !
So the actual formula used for the calculation is secret / unknown?
I use a custom forumla but it would be nice to know how the Custom Criteron Max forumla works, so one could make customisations to that. Such as adding profitable trade ratios, or exapanding the final value of the max fomula. You get a lot of 99.99 results and it can be quite hard to filter out the desired results from that without having to use excel to process everything again.
All parameters are better in the second line, still the complex criterion value is better for a pass with a loss of -6000 !
From the screenshot you have provided, its suggested that the Complex Criterion is generation dependent. Good results popping up in the early generations carry more weight.
The complex criterion gradually selects the best passes: firstly, by the number of deals, then by the Expected Payoff, Recovery Factor, and so on.
This cryptic text also suggests that it is timeline/generation dependent. Keywords here are "firstly" and "then".
On a side note, negative balance results aren't particularly bad for optimization, they play a crucial role in the future generation's judgement of bad from worst while genes are being crossed. So we should be careful when returning 0 as OnTester result if the trades are too little or if the balance is negative.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
thanks