Download MetaTrader 5

Command Line with specific configuration

To add comments, please log in or register
Henrique Vilela
1273
Henrique Vilela 2016.04.15 04:08 

Hi,

I'm trying to run the MT5 from the command line with a specific configuration based on the documentation.

So, what I'm doing is something like this:

C:\Program Files\MetaTrader 5 Terminal\terminal64.exe /config:C:\Users\hvilela\One\config.ini

I've reduce the content of the file to avoid any typo erros and at the moment it's as simple as follows:

[Tester]
Expert=Experts\_RobosInvestidores\3.5\One.ex5
Symbol=WIN$N

That's it. Set's a EA and a Symbol to the strategy tester. Nothing fancy.

When I take a look in the MT log after running the command I can see the line above.

JN      0       22:53:11.468    Terminal        launched with C:\Users\hvilela\One\config.ini

 When I change the name of the file in the command line to an inexistent file (like XXX.ini) this like is not present on the log, so it's clear that the config file was found and it's used.

The problem is that nothing changes. The EA is not loaded and the symbol is not set in the strategy tester.  

Where is my mistake here? Could you help me?

Thanks in advice. 

 [UPDATE]

Things I've already tried: 

  • Change the ini file location (to the data folder)
  • Change the ini file encode
  • Change the ini file EOL
  • Put the content of my ini file in the "terminal.ini" file  (that actually worked, but din't auto-started the strategy tester)

[UPDATE 2]

Just discovered that if I add "ShutdownTerminal=1" it closes the MT just after it starts, and don't do this when it's set to zero.

It've add many other params (Period=1, Visualization=0, Execution=0, DateRange=3, Deposit=10000, Leverage=100...) and none of them has effect on the strategy tester configuration.

So... the MT is reading my ini file, ignoring the other params, but successfully loading this specific parameter. How weird is that?

Alain Verleyen
Moderator
31138
Alain Verleyen 2016.04.15 10:08  

If your EA is in MQL5\Experts folder you need to specify it like :

Expert=Experts\_RobosInvestidores\3.5\One.ex5
To add comments, please log in or register