Moving Average Crossover Robot Available on MetaTrader 5

0

Now that MetaTrader 5 is finally able to perform backtests we've rewritten another of our example MT4 expert advisors to run on MetaTrader 5. Since the members of our forum seem to be particularly keen on moving average crossover systems at the moment, we've ported our robot example 3 over to MQL5 and tested it out using the MT5 strategy tester. If you want to try this for yourself please feel free to download our MQL5 source code.

We used exactly the same input settings as when we tested the MetaTrader 4 version in parallel with the Boston Technologies EA, and again used the first quarter of 2009 for our backtest period.  This is what the MetaTrader 5 strategy tester showed us:

MetaTrader 5 strategy tester result for EUR/USD over the first quarter of 2009

MetaTrader 5 strategy tester result for EUR/USD over the first quarter of 2009

If you compare this with the equivalent equity curve produced by MetaTrader 4:

MetaTrader 4 strategy tester result for EUR/USD over the first quarter of 2009

MetaTrader 4 strategy tester result for EUR/USD over the first quarter of 2009

you can see that the new version gives you useful additional information, such as keeping tabs on your test account equity (including open losses) whilst trades are open, as well as displaying details of your available margin. In this example, however, the available margin still falls to zero just like it did in MetaTrader 4, it's just that MT5 makes it more obvious what's going wrong!

We also quickly tried out the MetaTrader 5 optimizer, using the new distributed computing facility provided by MetaQuotes. We installed the latest build of MetaTrader 5 on a VPS of ours, and then ran the MetaTest.exe program that you can find in the MetaTrader 5 installation directory.  We followed the default installation procedure for the testing services inside the MetaTrader 5 Agents Manager, then opened up the necessary ports in Windows Firewall. Finally I added one of these new testing agents to the list on the Agents tab in the copy of MetaTrader 5 running on my laptop, and set off my first ever distributed MT5 optimization run. This is what I saw:

The MetaTrader 5 optimizer using a remote agent

The MetaTrader 5 optimizer using a remote agent

The two cores on my laptop, plus one of the cores on our VPS on the other side of the Atlantic, were each acting as an optimization agent and helping to work out how to set up our moving average crossover robot so that it might actually make some profit instead of losing money hand over fist.

Filed under Trading Systems by  #

Leave a Comment

Fields marked by an asterisk (*) are required.

Subscribe without commenting