I have been struggling a lot with this lately and found extremely vague documentation on the topic.
I have an algorithm that programatically creates EAs and compiles them into ex5 files (saving them to the Experts folder). Now I would like to execute these compiled EAs from the command prompt. I'm aware that such tasks can be achieved using custom config (.ini) files placed in the config folder. I tried creating my own strategytesting.ini config file but no matter what I include in that file, or exclude from it, I see no change in behavior whatsoever: every time I run the command in the command prompt, the Meta Trader terminal pops up, shows a login popup window (with my login and password autofilled/remembered), and that's all. Nothing else happens, no EA is executed, no symbols get opened besides the default one.
The command line command I've been using:
The config file is very minimalistic now, as I wanted to avoid all potential sources of errors. It is merely:
where Login and Password are obvious; the Expert line shows the location of the Expert I want to run upon opening the terminal and it is located within a subfolder called MyEAs within the Experts folder in ACCOUNTNUM\MQL5\Experts. And finally, I decided to include the Symbol parameter in the hope that that would force the EA to run, but even if that parameter is omitted, it doesn't currently make any difference.
I don't understand why
I have an algorithm that programatically creates EAs and compiles them into ex5 files (saving them to the Experts folder). Now I would like to execute these compiled EAs from the command prompt. I'm aware that such tasks can be achieved using custom config (.ini) files placed in the config folder. I tried creating my own strategytesting.ini config file but no matter what I include in that file, or exclude from it, I see no change in behavior whatsoever: every time I run the command in the command prompt, the Meta Trader terminal pops up, shows a login popup window (with my login and password autofilled/remembered), and that's all. Nothing else happens, no EA is executed, no symbols get opened besides the default one.
The command line command I've been using:
Inserted Code
"C:\Program Files\MetaTrader 5\terminal64.exe" /config:"C:\Users\AppData\Roaming\MetaQuotes\Terminal\ACCOUNTNUM\config\strategytesting.ini"
The config file is very minimalistic now, as I wanted to avoid all potential sources of errors. It is merely:
Inserted Code
Login = MYLOGINNAME Password = MYPASSWORD [Experts] Expert=MyEAs\EA_to_test.ex5 Symbol=EURUSD
I don't understand why
- nothing happens besides the terminal opening (no EA gets executed while no error shows either, neither in the Journal/Experts tabs of the terminal, nor in the daily log files), and
- the terminal ask for a manual approval of my login info even though they are autosaved anyway, and my config file containing the login details?
I have been relying on this documentation page, this forum post, and this thread.
Could someone please help me out what I am overlooking here?