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
![MetaTrader 5 build 2615: new properties of trading instruments and complex criterion in the Strategy Tester MetaTrader 5 build 2615: new properties of trading instruments and complex criterion in the Strategy Tester](https://c.mql5.com/36/57/metatrader-5-build-2615-new-properties__1.png)
- 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 !
![Complex Criterion Max formula Complex Criterion Max formula](https://c.mql5.com/36/79/complex-criterion-max-formula.jpg)
- 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.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- 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