Optimization is a very interesting topic and I think it would deserve more research on how to properly use it. I totally agree with you that it is an interpolation of data and as soon as one tries to reproduce the same results outside the time span used for optimization one gets different results. Personally, I set up the optimization as follows: * use only slow optimization (so that results are always reproducible); * do not optimize too many variables (I never exceed 3 variables); * never change the start period * keep track only of profit value (do not get distracted by the many other results provided) and this is how I read the optimization results: * run the optimization for the last year and save (on an Excel file) the parameters and the profit value; * every new month add a column with the new profit (ex: | profit from 01/01/2022 to 01/01/2023 | profit from 01/01/2022 to 01/02/2023 | .. |) Now I can see how each combination of parameters is performing and I tend to choose that one which has a constant profit average but also I can see how other symbols or market events are affecting my strategy in each period.
The difference lies with the nature of genetic algorithm , genetic algorithm finds the local maximum not the absolute maximum , after running some portion of the slow algorithm and getting an approximation about the optimized inputs then genetic algorithm can be used the find the absolute peak, thanks for the informations as always :)
Hi Arthur, a nice tutorial explaining the Optimization in MQL. However, I want to highlight an important point here. Instead of using 'Balance Max' criterion results are improved using 'Complex Criterion Max' which takes into account the following than just Balance Max. Number of trades Drawdown Recovery factor Expected payoff Sharpe ratio I got USD 1149.00 as the best result (same settings except for Balance Max) which is quite close to USD 1247.00 you got in your result. Hope this piece of information will be useful to your channel's viewers
I ran exactly the same tests as the video using complex criterion. Yes it gives different best results but again the best result from run 1 is not in the list form run 2 and the settings from best run 1 still produce a better result than the best result from run 2. Feel free to continue to use the optimizer if you like but I prefer not to give it any oxygen.
@@OrchardForex Thanks Arthur for the quick reply. I am actually using my own Performance Matrix criteria ('Custom Max' learned from another tutorial from Darwinx), in addition to the optimizer. Well up to now I could not have developed a final strategy, so I am a bit far from Optimizing it. This understanding though I learned from few optimization runs I had.
Nicely explained, Arthur. Thanks. However, I just watched a quant con video and Ernie Chan explained that using longer time horizons, for example, is one way of eliminating curve fitting. Since you used a year in your sample, it goes without saying that this is clearly going to be curve fitting. It could be the year when covid hit, etc.
As it happens, I'm currently working on a data analysis project using MT4's back tester. Using a simple MA/Price cross strategy (Enter/Exit at the cross, no TP/SL), I'm outputting trade results to a text file. Each trades Max profit/loss and actual closing profit/loss are recorded. For the time period I'm currently looking at, the sum of max potential profits is $14,626.00, and the sum of max potential losses is ($6,173). The net of all trades at closing is ($1,259.00). That's a lot of money left on the table! Still trying to figure out where to go next with this project. The goal is to devise a method to determine signals efficacy.
The only sense is walk forward optimization, in order to choose the optimization window vs. the prediction window. However, Strategy Tester does not support it, it must be programmed separately - luckily it can be done with MQL5. However, it takes a very veeeeeryyyy long time :/
Hey a bit ago you had stopped taking teaching clients and a friend and I are looking for more details on MT5/4 and frequently come back to your content. Not sure if you've reopened that up or not? Either way thank you for the content to add value to others
I never rely on it - always validate with slow process.. If i had more cpu i would use the slow process always.. Has anyone used 12gb Ryzen X3d processor ? I wonder if they are faster ?
Optimization is a very interesting topic and I think it would deserve more research on how to properly use it.
I totally agree with you that it is an interpolation of data and as soon as one tries to reproduce the same results outside the time span used for optimization one gets different results.
Personally, I set up the optimization as follows:
* use only slow optimization (so that results are always reproducible);
* do not optimize too many variables (I never exceed 3 variables);
* never change the start period
* keep track only of profit value (do not get distracted by the many other results provided)
and this is how I read the optimization results:
* run the optimization for the last year and save (on an Excel file) the parameters and the profit value;
* every new month add a column with the new profit
(ex: | profit from 01/01/2022 to 01/01/2023 | profit from 01/01/2022 to 01/02/2023 | .. |)
Now I can see how each combination of parameters is performing and I tend to choose that one which has a constant profit average but also I can see how other symbols or market events are affecting my strategy in each period.
The difference lies with the nature of genetic algorithm , genetic algorithm finds the local maximum not the absolute maximum , after running some portion of the slow algorithm and getting an approximation about the optimized inputs then genetic algorithm can be used the find the absolute peak, thanks for the informations as always :)
Hi Arthur, a nice tutorial explaining the Optimization in MQL. However, I want to highlight an important point here. Instead of using 'Balance Max' criterion results are improved using 'Complex Criterion Max' which takes into account the following than just Balance Max.
Number of trades
Drawdown
Recovery factor
Expected payoff
Sharpe ratio
I got USD 1149.00 as the best result (same settings except for Balance Max) which is quite close to USD 1247.00 you got in your result. Hope this piece of information will be useful to your channel's viewers
I ran exactly the same tests as the video using complex criterion. Yes it gives different best results but again the best result from run 1 is not in the list form run 2 and the settings from best run 1 still produce a better result than the best result from run 2. Feel free to continue to use the optimizer if you like but I prefer not to give it any oxygen.
@@OrchardForex Thanks Arthur for the quick reply. I am actually using my own Performance Matrix criteria ('Custom Max' learned from another tutorial from Darwinx), in addition to the optimizer. Well up to now I could not have developed a final strategy, so I am a bit far from Optimizing it. This understanding though I learned from few optimization runs I had.
Holy... this is very good. Thank you for making this!! Didn't think of this.
This is agreeing with other opinions I have seen on the built-in tester, and your detail is impressive
Thank you
Nicely explained, Arthur. Thanks. However, I just watched a quant con video and Ernie Chan explained that using longer time horizons, for example, is one way of eliminating curve fitting.
Since you used a year in your sample, it goes without saying that this is clearly going to be curve fitting. It could be the year when covid hit, etc.
As it happens, I'm currently working on a data analysis project using MT4's back tester. Using a simple MA/Price cross strategy (Enter/Exit at the cross, no TP/SL), I'm outputting trade results to a text file. Each trades Max profit/loss and actual closing profit/loss are recorded.
For the time period I'm currently looking at, the sum of max potential profits is $14,626.00, and the sum of max potential losses is ($6,173). The net of all trades at closing is ($1,259.00). That's a lot of money left on the table!
Still trying to figure out where to go next with this project. The goal is to devise a method to determine signals efficacy.
The only sense is walk forward optimization, in order to choose the optimization window vs. the prediction window. However, Strategy Tester does not support it, it must be programmed separately - luckily it can be done with MQL5. However, it takes a very veeeeeryyyy long time :/
Hey a bit ago you had stopped taking teaching clients and a friend and I are looking for more details on MT5/4 and frequently come back to your content. Not sure if you've reopened that up or not? Either way thank you for the content to add value to others
Not a while ago. I've never taken on teaching clients. That's not going to change.
Recursively running genetic on all the same settings/dates will produce different results.
Interesting, I hadn't noticed that but yet another reason to avoid it.
Wise beyond the boundaries, forget optimisation!
You can use slow with a small number of options
So you're saying slow complete algo is better to use than fast genetic based algo?
I never rely on it - always validate with slow process..
If i had more cpu i would use the slow process always..
Has anyone used 12gb Ryzen X3d processor ? I wonder if they are faster ?
@@sirt8684.....Use the metaquotes cloud optimise.....
Hi @OrchardForex, how can I contact you to discuss EA coding?
hi, orchard forex, i cant reach u in telegram,
I don't allow messages on telegram.