Running backtests in parallel - page 2

 
Marc Durocher #:

I create a NodeJs script that will start MT5 optimization process from command line. Once it is done, it will check every result of the optimization and backtest it against a different time range. So in my "backtest every optimization result" logic, I assign an MT5 instance to a particular backtest task, and run as many as I have MT5 installs spawned (this is config driven as it can depend on the total memory available on your computer). Each MT5 instances gets a specific port 3000, 3001 etc, so the location of generated files (sqlite database in this case) is predictable.

Once everything has done testing, the NodeJs script will then create a report of all the results ordered by net profitability.

Sounds good mate,

But perhaps I've misunderstood you.

In your original post you've said that you're not speaking about optimization,

And it sounded like you are looking for a way to run different EAs backtesting in parallel.

 
AMI289 #:

Sounds good mate,

But perhaps I've misunderstood you.

In your original post you've said that you're not speaking about optimization,

And it sounded like you are looking for a way to run different EAs backtesting in parallel.

Sorry for the confusion,

Once my script is done with optimization, that's where I was unsure on what route to take, because it can yield many results, and testing them one by one for me is a no go. So that's why I was looking to run backtests in parallel exclusively.

 
Mike D-rock #:

I create a NodeJs script that will start MT5 optimization process from command line. Once it is done, it will check every result of the optimization and backtest it against a different time range. So in my "backtest every optimization result" logic, I assign an MT5 instance to a particular backtest task, and run as many as I have MT5 installs spawned (this is config driven as it can depend on the total memory available on your computer). Each MT5 instances gets a specific port 3000, 3001 etc, so the location of generated files (sqlite database in this case) is predictable.

Once everything has done testing, the NodeJs script will then create a report of all the results ordered by net profitability.

Just want to check, if these ports 3000 , 3001 ... which are allocating dynamically can be configured? 

I want a dedicated port per instance... 

 
mallaravi #: Just want to check, if these ports 3000 , 3001 ... which are allocating dynamically can be configured? I want a dedicated port per instance... 

You can choose a range in the MetaTester Agents Manager ...


But if you setup each MetaTester agent manually from the command line, then you can set a specific port for each ...

Forum on trading, automated trading systems and testing trading strategies

Hyper-V problems and minimum requirements for MQL5 Strategy Tester Agents!

Fernando Carreiro, 2017.01.20 02:50

Further testing on my part has revealed that one can also work around the Hyper-V problem by using the command line interface to Install the Agents instead of the automatic method.

One just needs to uninstall all the automatically generated agent services (via the "MetaTester 5 Agents Manager") and then install them manually one by one (or with a batch file), using "MetaTester64.exe" command line parameters.

Use a port starting with 2000 incrementally in order to be congruent with the original setup and remember to use IP address 127.0.0.1 instead.

MetaTester64.exe /install /address:127.0.0.1:port /password:MetaTester



 
Fernando Carreiro #:

You can choose a range in the MetaTester Agents Manager ...


But if you setup each MetaTester agent manually from the command line, then you can set a specific port for each ..


Thanks for info.


i tried this, but still i see 3000 port is being used when i try to invoke Back testing..


Attaching images what i tried and what i see in folders

Files:
Image_2.JPG  38 kb
Image_1.JPG  152 kb
 
mallaravi #: Thanks for info. i tried this, but still i see 3000 port is being used when i try to invoke Back testing.. Attaching images what i tried and what i see in folders

It may be old folder. So, first remove all agents, then delete the folders, then re-activate them again.

I've tested it on my end and it works correctly.


 
Fernando Carreiro #:

It may be old folder. So, first remove all agents, then delete the folders, then re-activate them again.

I've tested it on my end and it works correctly.


Ohh ok, let me try.. thanks a lot
 
mallaravi #: Ohh ok, let me try.. thanks a lot
You are welcome!
 

Does anyone know if connecting 2 computers together, like a server (ish), will speed up the backtesting process? 

Thought being running them in parallel would split up the tasks more efficiently and thus quicker.

Individually, the computers have the following;

AMD Ryzen 9 5950

64 GB RAM

and

AMD Ryzen 9 3950

64GB RAM

both have 16 cores/ 32 threads, MT5 reads this as 32 cores for testing essentially making 64 cores. 


Any help is appreciated, thank you in advance!

 
@JWebs22 #: Does anyone know if connecting 2 computers together, like a server (ish), will speed up the backtesting process? Thought being running them in parallel would split up the tasks more efficiently and thus quicker.

Individually, the computers have the following; ... Any help is appreciated, thank you in advance!

You cannot speed up individual back-tests, as they run on a single thread.

You can only speed up optimisations as the passes can be distributed over several threads, on the local machine or on a "local farm" of several computers, or the MQL5 Cloud Network.

So, yes you can use a second computer running "MetaTester" to share the load of optimisation passes.

Strategy Optimization - Algorithmic Trading, Trading Robots - MetaTrader 5 Help
  • www.metatrader5.com
The Strategy Tester allows you to test and optimize trading strategies ( Expert Advisors ) before using them for live trading. During testing, an...
Reason: