MQL5 TUTORIAL – ADVANCED MASS BACKTESTING

video
play-sharp-fill

In this video I wanted to talk to you about mass testing.
Usually when you do a back test you will enable the visualization mode here and click on start and now you can watch the automated trades. This is already very fast but it still takes a lot of time, I guess this test would take about two minutes and if you want to trade several currency pairs and do a back testing process for a dozen different Forex charts, this can be very time consuming.
In this video we want to find out how we can speed up the testing process.
To do this please stop the current test and disable the visualization mode.
When I start a new test without the visualization this is much faster. You probably already know this. In our case we made a net profit of 152 Dollars and now I would like to do it for a dozen currency pairs or more.
The way to do this is to enable the optimization mode here, the last option is called: “All symbols selected in Market Watch” (MarketWatch).
So what is MarketWatch (market watch)?
You can enable it by clicking on “View /Market Watch” or pressing CTRL + M on your keyboard. Now you should see the little window here, it contains several currency pairs; you could also add new currency pairs here. In my case I have about a dozen currency pairs. Now let’s click on “Start” and you should see a tab called: “Agents”. I’ve got an 8 core processor so 8 different threads are going to start here, this is pretty fast. The first few processes already have been finished and in a few seconds we should be done and here are our results.
Well that was pretty fast, wasn’t it?
Now you can right click in the table here, export everything to XML, let’s save the file and now your spreadsheet calculation tool should pop up. In my case its LibreOffice Calc, and these are the profits for all the currency pairs. So let’s add them up and we would have made 3989 Dollars profit.
You can also right click in the “Market Watch” window and select a set like: “forex all” or click on “Show all” and when I restart the test now it says it is doing 46 different currency pairs.
Now you know how to do a quick test for a dozen currency pairs or more and you can do it in a fraction of the time.