What is the limit of the number of variables, steps and passes during optimization under MT5?

 

Hello,

I’m currently working on a neural network based expert advisor and I need to know the limits to consider for MT5 optimization.

Does anyone have the information about the maximum number of variables, steps and passes during optimization under MT5?

Also, is there any way to bypass the applied limits.

Thank you in advance for your help.

 
Zakaria Rachid: I’m currently working on a neural network based expert advisor and I need to know the limits to consider for MT5 optimization. Does anyone have the information about the maximum number of variables, steps and passes during optimization under MT5? Also, is there any way to bypass the applied limits. Thank you in advance for your help.

I think that what may be happening to you is that you are using the "Fast genetic based algorithm" for your optimisations.

Instead choose the "Slow complete algorithm" and you will not have a problem with limits (see below)


 
Fernando Carreiro #:

I think that what may be happening to you is that you are using the "Fast genetic based algorithm" for your optimisations.

Instead choose the "Slow complete algorithm" and you will not have a problem with limits (see below)


Hello Fernando,

Thank you for the proposition, but I’m not sure that "Slow complete algorithm" is a good option because of what I remember is that this option makes MT4/MT5 try all possible combinations of variables values without optimizing and trying to find optimal settings quickly in a reasonable time. Indeed, with that option the optimization might take several billions of years with my computer!!

Please correct me if I’m wrong.

 
Zakaria Rachid #: Thank you for the proposition, but I’m not sure that "Slow complete algorithm" is a good option because of what I remember is that this option makes MT4/MT5 try all possible combinations of variables values without optimizing and trying to find optimal settings quickly in a reasonable time. Indeed, with that option the optimization might take several billions of years with my computer!! Please correct me if I’m wrong.

The "Slow complete" optimisation does exactly the number of passes that you define based on what parameters you select and what start, step and stop you define for them. It will do no more and no less than what you define. That could be 2 passes or 100000 passes. It is up to you to define that.

 

For example, in the following I have selected only one parameter and defined a start, step and stop for it which will result in 51 passes.


 

Yes, but is it using optimization concepts to get the best results quickly? Because when I used it in the past, I had the impression that it simply scans the set of options without trying to find optimum points quickly (i.e., it is an options scanning algorithm and not a mathematical optimization algorithm).

 
Zakaria Rachid #: Yes, but is it using optimization concepts to get the best results quickly? Because when I used it in the past, I had the impression that it simply scans the set of options without trying to find optimum points quickly (i.e., it is an options scanning algorithm and not a mathematical optimization algorithm).

If it is doing ALL the passes, then obviously it does not need to "find" optimal genetic points because the final report will show ALL the results and metrics, including the "Complex Criterion" if you wish to optimise on that. You can also use the OnTester() result for your own "Custom" criterion.

If you want to implement your own Genetic optimisations where you control how it proceeds then use the "Working with Optimization Results" functionality of MQL5.

 
Fernando Carreiro #:

If it is doing ALL the passes, then obviously it does not need to "find" optimal genetic points because the final report will show ALL the results and metrics, including the "Complex Criterion" if you wish to optimise on that. You can also use the OnTester() result for your own "Custom" criterion.

If you want to implement your own Genetic optimisations where you control how it proceeds then use the "Working with Optimization Results" functionality of MQL5.

Hi, doing all the passes is not a feasible thing in my case (for example, If I have a neural network of 100 Perceptron, I will have 100^100 pass to execute!!).

My need is to use the generic algorithm without limitations and unfortunately, I’m not familiar with the mql5 optimization functionalities.

Does anyone have the experience of overcoming the optimization limitations imposed by MT5 while using the generic algorithm?

 
Zakaria Rachid #: Hi, doing all the passes is not a feasible thing in my case (for example, If I have a neural network of 100 Perceptron, I will have 100^100 pass to execute!!). My need is to use the generic algorithm without limitations and unfortunately, I’m not familiar with the mql5 optimization functionalities. Does anyone have the experience of overcoming the optimization limitations imposed by MT5 while using the generic algorithm?

The genetic optimisation by definition will adjust the number of required passes based on its algorithm and you don't have control over that.

So, if you want control on how the algorithm works, you will have to implement your own just as I stated ...

"If you want to implement your own Genetic optimisations where you control how it proceeds then use the "Working with Optimization Results" functionality of MQL5."

 
Zakaria Rachid #:

Hi, doing all the passes is not a feasible thing in my case (for example, If I have a neural network of 100 Perceptron, I will have 100^100 pass to execute!!).

My need is to use the generic algorithm without limitations and unfortunately, I’m not familiar with the mql5 optimization functionalities.

Does anyone have the experience of overcoming the optimization limitations imposed by MT5 while using the generic algorithm?

What limitations are you talking about ?

Do you know and understand how the genetic algorithm is working ?

 
I am also working on neural network so I can answer you. 
In MT4 the limit is 2^63 for the total steps.
In MT5 there is no such limit :)