Download MetaTrader 5

Automatic expert advisor testing

To add comments, please log in or register
Make screenshots in MetaTrader and manage them in the gallery!
jozin
43
jozin 2012.03.23 07:37 

Hi,

I'm trying to test and optimize EA's, is there a way to make testing EA's on historical data automatic?

What I want is a script (or anything else) that will run my test repeatedly with different parameters.

For exaplme that I would specify a list of parameteres and run the testing during the night without having to set the parameters and pressing the start button each time.

I've searched for some time and didn't find anthing. Asked on other forums with no responce.

Thank you very much!

Josef

raja
3
raja 2012.03.23 09:40  
jozin:

Hi,

I'm trying to test and optimize EA's, is there a way to make testing EA's on historical data automatic?

What I want is a script (or anything else) that will run my test repeatedly with different parameters.

For exaplme that I would specify a list of parameteres and run the testing during the night without having to set the parameters and pressing the start button each time.

I've searched for some time and didn't find anthing. Asked on other forums with no responce.

Thank you very much!

Josef

explain please
Simon Gniadkowski
Moderator
18001
Simon Gniadkowski 2012.03.23 09:53  
jozin:

Hi,

I'm trying to test and optimize EA's, is there a way to make testing EA's on historical data automatic?

What I want is a script (or anything else) that will run my test repeatedly with different parameters.

For exaplme that I would specify a list of parameteres and run the testing during the night without having to set the parameters and pressing the start button each time.

I've searched for some time and didn't find anthing. Asked on other forums with no responce.

Thank you very much!

Josef

Read the MT4 Help, it's all in there under the stuff about the Strategy Tester, you can use batch files and set files to setup a run of tests, the only thing I haven't been able to do is run this in visual mode at max speed . . . non visual mode worked just fine.
Ubzen
5394
Ubzen 2012.03.23 12:37  
RaptorUK:
Read the MT4 Help, it's all in there under the stuff about the Strategy Tester, you can use batch files and set files to setup a run of tests, the only thing I haven't been able to do is run this in visual mode at max speed . . . non visual mode worked just fine.


https://www.mql5.com/en/articles/1467. Hey RaptorUK, are you using a process similar to this one or something else?

Simon Gniadkowski
Moderator
18001
Simon Gniadkowski 2012.03.23 12:54  
ubzen:


https://www.mql5.com/en/articles/1467. Hey RaptorUK, are you using a process similar to this one or something else?

Something else . . . it's all explained in the MT4 Help . . . search for "Configuration at Startup"

I set the parameters for my EA, save a set file. I then create an txt file which specifies this set file, amongst other things, false login & password to keep the terminal offline the name of the EA, the Symbol, Period, start and end dates and a report name . . . then I have a batch file that runs the terminal with this txt file . . .

start /wait terminal.exe EURJPY.txt

I can have multiple lines like this in the batch file . . . so I can set several runs to occur overnight . . .

Ubzen
5394
Ubzen 2012.03.23 13:04  
RaptorUK:

Something else . . . it's all explained in the MT4 Help . . . search for "Configuration at Startup"

I set the parameters for my EA, save a set file. I then create an txt file which specifies this set file, amongst other things, false login & password to keep the terminal offline the name of the EA, the Symbol, Period, start and end dates and a report name . . . then I have a batch file that runs the terminal with this txt file . . .

start /wait terminal.exe EURJPY.txt

I can have multiple lines like this in the batch file . . . so I can set several runs to occur overnight . . .


Cool Thx.
Simon Gniadkowski
Moderator
18001
Simon Gniadkowski 2012.03.23 13:18  
ubzen:

Cool Thx.
You are most welcome. As I said, the only thing I wasn't able to make happen that I wanted to happen was visual mode with the speed set to max. One other thing, you need to close the terminal down in non visual mode . . . . otherwise when it is launched it will be in visual mode and will run very slowly.
jozin
43
jozin 2012.03.24 08:52  
This is great! Thank you for your help!
Bruno
72
Bruno 2012.08.22 22:02  
RaptorUK:

Something else . . . it's all explained in the MT4 Help . . . search for "Configuration at Startup"

I set the parameters for my EA, save a set file. I then create an txt file which specifies this set file, amongst other things, false login & password to keep the terminal offline the name of the EA, the Symbol, Period, start and end dates and a report name . . . then I have a batch file that runs the terminal with this txt file . . .

start /wait terminal.exe EURJPY.txt

I can have multiple lines like this in the batch file . . . so I can set several runs to occur overnight . . .


Nice!!!

At the first time I think jozin look for something like this:

https://www.mql5.com/en/forum/140187

But looks only for predetermined sets.

=)

Björn Arnulfson
66
Björn Arnulfson 2013.01.29 10:00  
RaptorUK:

Something else . . . it's all explained in the MT4 Help . . . search for "Configuration at Startup"

I set the parameters for my EA, save a set file. I then create an txt file which specifies this set file, amongst other things, false login & password to keep the terminal offline the name of the EA, the Symbol, Period, start and end dates and a report name . . . then I have a batch file that runs the terminal with this txt file . . .

start /wait terminal.exe EURJPY.txt

I can have multiple lines like this in the batch file . . . so I can set several runs to occur overnight . . .


Thanks for this tip.

It works on my system, but only for one file: MetaTrader is started, the backtest is run, but then this first instance of MetaTrader stays alive and the second line of the batch script is never executed. I.e. it seems that the system waits forever until the process started in the first line comes to an end.

Is there a solution to this problem? 

Simon Gniadkowski
Moderator
18001
Simon Gniadkowski 2013.01.29 10:09  
bjoern:


Thanks for this tip.

It works on my system, but only for one file: MetaTrader is started, the backtest is run, but then this first instance of MetaTrader stays alive and the second line of the batch script is never executed. I.e. it seems that the system waits forever until the process started in the first line comes to an end.

Is there a solution to this problem? 

What do you have in the file that you pass to MT4 ?  This is mine . . notice the  TestShutdownTerminal=true

; common settings
  Login=12345
  Password=xxxxxx
  


; start strategy tester
  TestExpert=TradeEA-BackupV1.7.8
  TestExpertParameters=178opt.set
  TestSymbol=EURUSD
  TestPeriod=M15
  TestModel=0
  TestOptimization=true
  TestDateEnable=true
  TestFromDate=2009.03.01
  TestToDate=2009.09.01
  TestReport=EURUSD-29-02-2012-Report
  TestReplaceReport=false
  TestShutdownTerminal=true
123
To add comments, please log in or register