MQL4 - automated forex trading   /  

Forum

Read Financial Magazines in MetaTrader 4 and MetaTrader 5!

Command line options for terminal.exe

Back to topics list To post a new topic, please log in or register
avatar
Moderator
1937
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-

 
Lite_EXPERT2.mqh: Expert Advisor Implementation Examples

Lite_EXPERT2.mqh: Expert Advisor Implementation Examples

In this article, the author continues to familiarize the readers with the Lite_EXPERT2.mqh functions using real Expert Advisor implementation examples. The article deals with the idea of using floating pending orders and pending orders that vary dynamically from deal to deal which are determined based on Average True Range (ATR) indicator values.

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
1937
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
432
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
2382
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
Back to topics list  

To add comments, please log in or register