Issue running optimization from command line

 

Hi,

I am getting issues with running mt5 optimization from command line. No fixed pattern on the issue happening.

For GBPJPY, i could do M5, M15 but not M30
For NZDJPY, i cant do any. M5, M15, M30, H1

MT5 will open up, start optimization and immediately exit. When i check the MT5 journal, i get the below error.

However, when i run the optimization manually, it works just fine.

Any idea?

 
Jan Nem Yong:

Hi,

I am getting issues with running mt5 optimization from command line. No fixed pattern on the issue happening.

For GBPJPY, i could do M5, M15 but not M30
For NZDJPY, i cant do any. M5, M15, M30, H1

MT5 will open up, start optimization and immediately exit. When i check the MT5 journal, i get the below error.

However, when i run the optimization manually, it works just fine.

Any idea?

The error message is pretty clear, isn't ? You have no history data.
 
Alain Verleyen #:
The error message is pretty clear, isn't ? You have no history data.

i can be sure history data is there. because i run it many times manually, and when i run it, it does not download any new history data.

but when running it via command line, it fails.

 
Jan Nem Yong #:

i can be sure history data is there. because i run it many times manually, and when i run it, it does not download any new history data.

but when running it via command line, it fails.

Are you sure you are connected to the same account when running from command line ?
 
Alain Verleyen #:
Are you sure you are connected to the same account when running from command line ?

yes very sure.

i also found out that if the above happens, i need to delete the history data and somehow let the mt5 re-download the same data again before it works.


not sure why tho. 

 
Jan Nem Yong #:

yes very sure.

i also found out that if the above happens, i need to delete the history data and somehow let the mt5 re-download the same data again before it works.


not sure why tho. 

Is that happening too if you are using a standard EA like "Moving Average" ?
 
Alain Verleyen #:
Is that happening too if you are using a standard EA like "Moving Average" ?

No i didnt test that. Will try to test it.

So all the optimization are run by script in command line. It will do M5, M15, M30, H1 in sequence.

Below is the log when i start the optimization from USDCHF, you can see that M5 and M15 fails but the next one, which is M30, runs successfully. And all these while, i did not touch anything, the script runs the command lines sequentially.

I've tried deleting the history files and let it re-download again, same issue.

What's interesting to note is that this issue seems to happen randomly, the first run, M5 had issue, M15 was done, 2nd run onwards, M5 and M15 fails and M30 was fine.

I had a run where all 4 TF fail with same error.

Not sure if there are more stable methods to automate optimizations. If i run manually from the MT5 terminal, it works perfectly fine, just that i need to keep monitoring the optimization and when it finish, start the next one.