in MT5, is there a way to stop optimization at predefined number of iterations without manually seeing the number and pressing the Stop button?
That makes no sense. If you stop it early, you do not have an optimization.
Then consider using "Genetic" optimisations instead.
Or reduce your input ranges (start, step. stop) and select fewer inputs to optimise.
If you are getting 10000 even after selecting genetic optimisations, then you are using way too many inputs or using too many steps for each input. You need to be more smart about your selections.
If your strategy has so much too optimise, then chances are that it will fail in real trading. You will end up curve fitting which will only look good in back-tests but do badly going forward.
If you are getting 10000 even after selecting genetic optimisations, then you are using way too many inputs or using too many steps for each input. You need to be more smart about your selections.
If your strategy has so much too optimise, then chances are that it will fail in real trading. You will end up curve fitting which will only look good in back-tests but do badly going forward.
Every day I reoptimize 7 parameters for the best inputs during previous 2 weeks and trade it present day. I use step of 2-5 between inputs - it gives at least 10,000 iterations.
I am successful at it and would like to reoptimize on "Every Tick". I do not want to seat and wait until it gets to 3,000 iteration and then stop it manually.
Do not mind if it is curve fitting or not, it works for me....So my basic question is, is there a way to indicate how many iterations I would like?
Every day I reoptimize 7 parameters for the best inputs during previous 2 weeks and trade it present day. I use step of 2-5 between inputs - it gives at least 10,000 iterations.
I am successful at it and would like to reoptimize on "Every Tick". I do not want to seat and wait until it gets to 3,000 iteration and then stop it manually.
Do not mind if it is curve fitting or not, it works for me....So my basic question is, is there a way to indicate how many iterations I would like.
If you have to source code, it's possible to add some workarounds (because even by code there is no direct command to stop an optimization).
Otherwise not possible to my knowledge.
Then write your code to self-optimise in real-time. Historical tick and bar data is available to the EA in real-time while trading.
So have the EA process that data during idle time and simulate or carry out virtual trades with various input parameter combinations.
You can keep a running database of these virtual trades with running metrics within a time period of analysis. Then you can have your EA select the best option at regular interval or continuously based on whatever metrics you wish to track.
If I remember correctly, there should be an example of such an EA in the Articles that does self-optimsation on a moving average strategy.
EDIT: Instead of keeping a database, you can instead use incremental calculations using exponential moving averages of the metrics. This way, there is no extra storage space requirements and CPU overhead is low, and you have the metrics available for continuous adaptation of your strategy.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use