Starting terminal.exe with a profile through a batch file

 

I want to start MT4 with a specific profile through a batch file.


Is this the correct way?

terminal.exe /profile:"C:\Users\abc\AppData\Roaming\MetaQuotes\Terminal\xyz\profiles\NASDAQ"


I found this solution on another forum, but Im not able to direct the terminal to use the AppData folder:

echo NASDAQ > profileslastprofile.ini

timeout /t 1

START /MAX terminal.exe


Would the batch work with the following correction?

echo NASDAQ > " C:\Users\abc\AppData\Roaming\MetaQuotes\Terminal\xyz\profiles\profileslastprofile.ini"

timeout /t 1

START /MAX terminal.exe


I cant get to my pc to try it for the next 9 hours, so help and insight is highly appreciated.

 
mp535: I want to start MT4 with a specific profile through a batch file.

The details on how to start the terminal from the command line are in the documentation ...Platform Start - For Advanced Users - Getting Started - MetaTrader 5 Help

 
Fernando Carreiro #:

The details on how to start the terminal from the command line are in the documentation ...Platform Start - For Advanced Users - Getting Started - MetaTrader 5 Help

1. Im using MT4 and Win10. I should have put this in the title.

2. If i just use  ´terminal.exe /profile:NASDAQ´, the terminal searches in its own root directory, instead of the AppData folder, where the profiles i created are saved.


I want to apologise, if im mistaken.

 
mp535 #: 1. Im using MT4 and Win10. I should have put this in the title.

Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
          General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. The moderators will likely move this thread there soon.

 

mp535 #:

1. Im using MT4 and Win10. I should have put this in the title.
2. If i just use  ´terminal.exe /profile:NASDAQ´, the terminal searches in its own root directory, instead of the AppData folder, where the profiles i created are saved.

Then read the MT4 documentation — Help → Help Topics (F1) ... Tools → Configuration at Startup

Next time, please post in the MT4/MQL4 section which is at the very end of the forum.