MQL4 - automated forex trading   /  

Forum

Login | Register | Language: ru cn en
MetaTrader Market - the place where newest trading robots appear

Command line options for terminal.exe

Back to topics list To post a new topic, please log in or register
avatar
Moderator
1936
BarrowBoy 2008.03.11 16:06
 

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-

 
A Simple Day Trading Strategy by Markus Heitkoetter : " In this video I am presenting a simple day trading strategy using Bollinger Bands and MACD."

A Simple Day Trading Strategy by Markus Heitkoetter : " In this video I am presenting a simple day trading strategy using Bollinger Bands and MACD."

The Complete Guide to Day Trading: A Practical Manual From a Professional Day Trading Coach by Markus Heitkoetter Do you want to be a day trader? Every day, millions of dollars change hands in the markets, presenting the perfect opportunity for people just like you to make significant money and profits through the art of day trading. But here's the question: is day trading right for you?

avatar
396
ukt 2008.03.11 16:15 #
 
in Terminal help: User Guide <F1>
see: Tools > Configuration at Startup

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

hth


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


 
avatar
Moderator
1936
BarrowBoy 2008.03.11 16:45 #
 

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



 
avatar
3
tdupard 2009.06.25 16:31 #
 

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


avatar
434
Ruptor 2009.06.25 19:49 #
 

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.

 
avatar
514
FourX 2010.07.01 16:46 #
 
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.
 
avatar
10
avatar
2410
deVries 2012.08.27 00:27 #
 
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
avatar
3
aekespong 2014.04.27 08:16 #
 

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.


Back to topics list  

To add comments, please log in or register