MQL5 Cloud Network: Are You Still Calculating?

MetaQuotes | 4 April, 2013

It will soon be a year and a half since the MQL5 Cloud Network has been launched. This leading edge event ushered in a new era of algorithmic trading - now with a couple of clicks, traders can have hundreds and thousands of computing cores at their disposal for the optimization of their trading strategies.

All issues regarding network installation, setup and structure are covered in the FAQ section on the official MQL5 Cloud Network website. And yet there is one question that has been eating many of us up: "How much?" And to answer this question once and for all we have added a special feature that allows every cloud agent customer to see how many tasks were computed over the optimization of his Expert Advisor. All you need is to go to Agents ->Tasks in your MQL5.community profile.

Tasks tab in the Agents section

Here you will be able to see in how many passes the optimization was completed, when it was performed and how much it cost you. The Screenshot above suggests that the optimization of the Expert Advisor MACD Sample available in the standard delivery for EURUSD on H1 (symbol and time frame, respectively) began on September 20, 2012 at 14:20. The number of passes (completed tasks) at this point is zero as the screenshot was taken right at the start of the optimization.


Optimization of MACD Sample over 7 months in the "Every tick" mode

The Figure below shows settings made for the parameter optimization.

MACD Sample optimization parameters

Given the combination of the MACD Sample external parameters, the number of passes totaled over 152 billion. Even if we assume that every pass requires 1 second of time, the total optimization time will be 485 years. In the settings, select the interval from 2012.01.01 to 2012.08.01 and the tick generation mode "Every tick" as when testing in the Automated Trading Championship 2012 Automatic Tests.

Select Slow Complete Algorithm (complete parameter search) as the optimization mode and start the optimization. The strategy tester will independently determine that the given number of passes requires the use of the Fast Genetic Based Algorithm and will switch to this faster optimization mode. The optimization employing the Fast Genetic Based Algorithm only involves agents of one MQL5 Cloud Network task manager since it is the responsibility of the task manager to redistribute tasks among the associated agents.

Cloud agents computing the MACD Sample optimization tasks

The Figure above shows that 2172 tasks were distributed among the agents of the access point Europe 2 and the computing of 2168 of them has currently been completed.

The fact that the strategy tester switched to the Fast Genetic Based Algorithm can be easily verified by number 10496 displayed in the line of estimated passes. The screenshot below suggests that 2815 passes out of 10496 have been completed by now.

MACD Sample optimization settings

To monitor the optimization chart, let us switch to the corresponding tab.

Optimization chart

Following the optimization, we switch to the Journal where we can see that the optimization completed on pass 8704 and the total of 134 tasks were computed using local agents (3% of the total number of tasks) as opposed to 3892 tasks computed using cloud agents.

Startegy Tester journal with optimization messages


How much is the computing of 4000 tasks?

Now we can find out the answer to the question asked at the beginning - how much it costs to optimize the Expert Advisor MACD Sample over the interval from 01.01.2012 to 01.08.2012 in the "Every tick" mode. We go to our profile and see the answer in the "Agents" tab being 0.23 credits.

Entry in the "Tasks" Tab Regarding the Number of Passes, Time Taken and Computing Costs in the MQL5 Cloud Network

Cloud agents computed 3892 tasks in 24 minutes which fully agrees with the strategy tester data.

So, we had almost 500 agents working for us for 24 minutes and it only cost us 0.23 credits. If you only had 4 local agents involved, you would have to wait (500 cloud agents * 24 minutes / 4 local agents) for 3000 minutes which makes 50 hours or a bit over 2 days for the optimization to finish. Thus, you bought 50 hours of computations for the trading strategy parameter optimization for 0.23 credits. And now think what you can buy for $0.23 in real world - not much, is it?

Decide for yourself if such speedup is worth that money!