Optimization Automation in MQL5

 

I'm wondering if there is any way or tool to schedule an optimization process in MT5.

My idea is to select, for example, 10 symbols, activate the process and allow once completed with one symbol, to automatically continue with the next, and then analyze the results later.

Any hint is welcome. Thanks in advance

 

I do believe there's. If I'm not mistaken, there's a way to run the optimization via command line, but I don't know about that - would be the easier way.


The hardest way is to create a program using the winapi that:


1 - Gets the state of the "Start"/"Stop" optimization button. If the optimization has started, it is set to "Stop"; otherwise, it is set to "Start".

2 - Gets and sets the current value of the symbols combobox to the desired symbol.

3 - Clicks the "Start" button after the desired symbol has been set.

4 - Repeat.


The results are stored in the "Optimization Results" tab in MT5.


I never tested it, although I have a simple program that reproduces the first step.

 
Enrique Enguix:

My idea is to select, for example, 10 symbols, activate the process and allow once completed with one symbol, to automatically continue with the next, and then analyze the results later.

https://www.mql5.com/ru/code/26132
MultiTester
MultiTester
  • www.mql5.com
Множественные прогоны/оптимизации в Тестере.
 
Emanuel Cavalcante Amorim Filho #:

I do believe there's. If I'm not mistaken, there's a way to run the optimization via command line, but I don't know about that - would be the easier way.


The hardest way is to create a program using the winapi that:


1 - Gets the state of the "Start"/"Stop" optimization button. If the optimization has started, it is set to "Stop"; otherwise, it is set to "Start".

2 - Gets and sets the current value of the symbols combobox to the desired symbol.

3 - Clicks the "Start" button after the desired symbol has been set.

4 - Repeat.


The results are stored in the "Optimization Results" tab in MT5.


I never tested it, although I have a simple program that reproduces the first step.

Hello, thank you very much for responding. From the first method, I know how to start an optimization through code. I didn't know the second one, but in both the first and the second they have the same problem, which is the sequencing in the change from one symbol to another. If it can be done by code I will ask for it from freelance, but after reviewing the documentation I have not been able to find a way to do it.
 
Thanks for your answer. Will it also be used for optimization?

 
As Emmanuel stated, it is possible to launch the tester/optimiser  from the command line. Depending on your OS you'd want to write a native script for your machine. 

Furthermore, there's a text file that you can edit in order to have programmatic control over the test dates, Symbol, EA parameters during testing.
 
Enrique Enguix #:
Thanks for your answer. Will it also be used for optimization?

Read the description.

 
fxsaber #:

Read the description.

Thanks, I will implement your library, very good!
Reason: