Command line options for terminal.exe

 

I have forum-searched & Googled this but there is not much out there :(

Looking at this 'Ask'

we can have n copies of the application on each computer...

but how do we start them easily on reboot to connect and start operations?

Command lines in shortcuts or batch files in the Startup folder (of XP) would seem to be a simple method but what are the switches & their order?

I have read that account number &/or profile can be set in a command line but what exactly are all the options?

Broker Server IP?
Account Number?
Password?
Profile?

TIA

-BB-

 
in Terminal help: User Guide <F1>
see: Tools > Configuration at Startup

Also have look at https://www.mql4.com/search/Configuration%20at%20Startup

hth


also see in XP: start > help and support
search using string: Common tasks: Scheduled Tasks

 

Doh!

Thanks very much ukt :)

Seems the context for this information is within the application construction rather than MQL programming.

I had noticed that after a crash, MT4 would not neccessarily restart on the same profile or chart/s as prior to the hang.
So I was keen to handle quick recovery as well as efficient initial setup - this system does both :)

To save people trawling through it, it appears you can start a specific instance of MT4 with a command line (in batch file or shortcut)

e.g.

c:\alpari1\terminal.exe config\start.ini

c:\MIG2\terminal.exe config\start.ini


An example of start.ini would be:


; common settings
Profile=test 3
MarketWatch=set2.set
Login=12345
Password=xxxxxx
Server=MetaQuotes-demo
AutoConfiguration=false
DataServer=192.168.0.1:443
EnableDDE=true
EnableNews=false
Proxy Server Settings

; experts settings
ExpertsEnable=true
ExpertsDllImport=true
ExpertsDllConfirm=true
ExpertsExpImport=true
ExpertsTrades=true
ExpertsTradesConfirm=false

; open chart and run expert and/or script
Symbol=EURUSD
Period=H4
Template=popular.tpl
Expert=MACD Sample
ExpertParameters=macd.set

 

Hi I am trying to do batch testing of EA's using a .INI file for each EA and then telling strategy tester to process them, as per the Help documetation. But Between each and every file The terminal shuts down and re-opens and re-logins.


This of course is very time consuming and probably very annoying to my broker's server when doing several dozen EA's.


Does anyone know of a way in the batch file to tell the terminal to start one instance and use it for the whole test. Or to use an already open instance if one is already open on that machine?


Many thanks,


Thierry

 

Hi BB

I use the simple method of making an icon for each different instance of MT4 then I just plonk the icons that I want to auto start in the startup menu.

 
As informed by Gordon, the Help files say that one can modify the start.ini file for startup options and might accomplish it that way. But looking in the config folder there is no actual start.ini file there at all. Perhaps it is optional. There is a number of other ones, most of which are complied. But there are two files:Terminal.ini and MetaEditor.Ini files that are text files, but for the most part they just have information about the physical layout and configuration of these two executable programs.
 

how to set ftp setting in mt4 start up using command line.

 
xcoder:

how to set ftp setting in mt4 start up using command line.


extern int ftp = 5;  //this way we have a ftp setting in the start up with a command line
 

The parameter names has actually changed. From "ExpertParameters" to "TestExpertParameters" for example.

I can't find the documentation anymore for MetaTrader 4.

This solution works.

On the command line I issue a bat-file with the following contents:

"C:\Program Files (x86)\MetaTraderl\terminal.exe" /wait "C:\Users\Username\AppData\Roaming\MetaQuotes\Terminal\Common\Files\kanalen GER30 H1 bull.txt

And the contents of the text file is:

; Generated [Sun 2014-04-27 08:01:57]

TestExpert=kanalen

TestExpertParameters=kanalenbear.set

TestSymbol=GER30

TestPeriod=H1

TestModel=2

TestOptimization=false

TestDateEnable=true

TestFromDate=2014.01.01

TestToDate=2014.12.31

TestReport=kanalen H1 GER30 bear

TestReplaceReport=true

TestShutdownTerminal=true


Hope this will help someone. I surely would have benefitted myself if I've gotten this help.

I also have a script that generates all these command-files. It makes it possible to easily to test 15 strategies.

Then I do a portfolio analysis by reading from the generated htm-files which ends up in a .CSV-file for the Portfolio.

 

That's fantastic that I found topic dealing with problems I have.

Unfortunately that solution doesn't work for me(yet).

What I'm doing wrong ?

C:\Program Files (x86)\BOSSAFX>"C:\Program Files (x86)\BOSSAFX\terminal.exe" /wait "C:\Users\marcin.zieba\AppData\Roaming\MetaQuotes\Terminal\Common\Files\ GBPUSD D1 params.txt"

 

params.txt:

 

; Generated [Sun 2014-04-27 08:01:57]

TestExpert=Feeder_DB

;TestExpertParameters=kanalenbear.set

TestSymbol=GBPUSD

TestPeriod=D1

TestModel=2

TestOptimization=false

TestDateEnable=true

TestFromDate=2016.01.01

TestToDate=2016.06.30

;TestReport=

TestReplaceReport=true

TestShutdownTerminal=true

 

Seems correct.

 Try to change TestModel to 1 or 0.

 /André 

Reason: