Strategy Tester Batch Mode

 

Hi guys,

this is topic often discussed. However, I cannot get the strategy tester started in batch mode from the command line.

Can anyone held? Here is my ini file:


[Common]
Environment=---
MQL5Login=programminggeek
MQL5Password=---
Login=---
ProxyEnable=0
ProxyType=0
ProxyAddress=
ProxyAuth=
CertInstall=0
NewsEnable=1
NewsLanguages=
Source=www.jfdbank.com
MQL5UseStorage=1
[Charts]
ProfileLast=Default
MaxBars=100000
PrintColor=0
SaveDeleted=0
TradeHistory=1
TradeLevels=1
TradeLevelsDrag=0
ObsoleteLasttime=1612008651
PreloadCharts=1
[Experts]
AllowDllImport=0
Enabled=1
Account=1
Profile=1
Chart=0
Api=0
DisableOpenCL=
WebRequest=0
DisableFPExceptionsLog=0
WebRequestUrl=
[Trades]
LotsMode=0
LotsLastExt=50000000
LotsDefaultExt=10000
SymbolMode=0
SymbolLast=.DE30Cash
SymbolDefault=.DE30Cash
DeviationMode=0
DeviationDefault=0
DeviationLast=0
StopsMode=0
[Tester]
Expert=volumeman\2_Staging\GoldenDeadCrossAdvisor.ex5
ExpertParameters=BlueTest_PureGoldenDead.ini
Symbol=.DE30Cash
Period=H1
Login=---
Deposit=10000
Leverage=1:100
Model=0
ExecutionMode=1
Optimization=2
OptimizationCriterion=0
FromDate=2021.01.04
ToDate=2021.01.29
ForwardMode=0
ForwardDate=2011.03.01
Report=test_bluegolden
ReplaceReport=1
ShutdownTerminal=1


I am trying to start it as follows:

C:\"Program Files"\"JFD MetaTrader 5"\terminal64.exe /config:c:/common.ini


The terminal comes up but nothing happens.


Maybe someone can help out here. It would be interesting to know where EXACTLY to place the files and where EXACTLY the report is written to ...


Thanks, Niklas

The Fundamentals of Testing in MetaTrader 5
The Fundamentals of Testing in MetaTrader 5
  • www.mql5.com
What are the differences between the three modes of testing in MetaTrader 5, and what should be particularly looked for? How does the testing of an EA, trading simultaneously on multiple instruments, take place? When and how are the indicator values calculated during testing, and how are the events handled? How to synchronize the bars from different instruments during testing in an "open prices only" mode? This article aims to provide answers to these and many other questions.
 
Niklas Rolf Alexander Schlimm:

Hi guys,

this is topic often discussed. However, I cannot get the strategy tester started in batch mode from the command line.

Can anyone held? Here is my ini file:



I am trying to start it as follows:

C:\"Program Files"\"JFD MetaTrader 5"\terminal64.exe /config:c:/common.ini


The terminal comes up but nothing happens.


Maybe someone can help out here. It would be interesting to know where EXACTLY to place the files and where EXACTLY the report is written to ...


Thanks, Niklas

 I get same questuon as yours. Do you have any update with it?

I try termeril64.exe /config: my.ini  , This just awake MQL5 main program, but tester not run..


Any new ideal?

 

This is what my (working) batch file looks like:

@echo off
set mt5_path="C:\Program Files\FOREX.com US\terminal64.exe"

%mt5_path% /config:"AUDCAD windex2.81.genetic.cc.no-sl.ini"
%mt5_path% /config:"AUDCAD windex2.81.genetic.rf.no-sl.ini"
%mt5_path% /config:"AUDCAD windex2.81.genetic.rf.no-sl.ma.ini"
%mt5_path% /config:"AUDCAD windex2.81.genetic.rf.no-sl.no-ma.ini"
%mt5_path% /config:"AUDCAD windex2.81.genetic.rf.no-sl.ma.no-dca.ini"
%mt5_path% /config:"AUDCAD windex2.81.genetic.rf.no-sl.no-dca.ini"
...

Also, as you have done, you need to be sure to include ShutdownTerminal=1 in the [Tester] section, otherwise it won't exit when the test is done.

I just finished running a batch of 462 tests this way. Fair warning that a lot of them fail, for no apparent reason. I ended up having to edit the batch file after each run to just run the remaining ones. They eventually all ran. I'm not 100% sure, but it does seem to help if you make sure the tick/bar data you need is downloaded before you start, rather than relying on the Strategy Tester to load it as needed.