cloud backtesting fails or returns zero

 

Hi,

since I don't get any reply from service desk I hope to find a solution (or explanation) here:

I'm trying to backtest a market EA, 3 months, tick, genetic. To speed this up I tried to use the cloud but dont have any success. Either my MT5 installation only connects (successfully) and disconnects (for whatever reason...) and thats it.

 

If I'm able to initiate a cloud backtest it replies only "returned result 5000.00" values, each process takes 6-8 seconds:

JJ      0       11:32:10        MQL5 Cloud Europe 2     genetic pass (0, 47) returned result 5000.00 in 7 sec (PR 166)
ON      0       11:32:10        MQL5 Cloud Europe 2     genetic pass (0, 34) returned result 5000.00 in 7 sec (PR 165)
OR      0       11:32:10        MQL5 Cloud Europe 2     genetic pass (0, 71) returned result 5000.00 in 6 sec (PR 204)
JQ      0       11:32:10        MQL5 Cloud Europe 2     genetic pass (0, 44) returned result 5000.00 in 7 sec (PR 152)
HE      0       11:32:10        MQL5 Cloud Europe 2     genetic pass (0, 36) returned result 5000.00 in 7 sec (PR 151)
CI      0       11:32:10        MQL5 Cloud Europe 2     genetic pass (0, 48) returned result 5000.00 in 7 sec (PR 173)
CM      0       11:32:10        MQL5 Cloud Europe 2     genetic pass (0, 69) returned result 5000.00 in 7 sec (PR 165)
JP      0       11:32:10        MQL5 Cloud Europe 2     genetic pass (0, 20) returned result 5000.00 in 7 sec (PR 150)
CD      0       11:32:10        MQL5 Cloud Europe 2     genetic pass (0, 31) returned result 5000.00 in 7 sec (PR 153)
RH      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 29) returned result 5000.00 in 8 sec (PR 157)
PO      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 8) returned result 5000.00 in 8 sec (PR 125)
ES      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 76) returned result 5000.00 in 7 sec (PR 166)
MG      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 30) returned result 5000.00 in 8 sec (PR 167)
HK      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 12) returned result 5000.00 in 8 sec (PR 164)
IO      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 14) returned result 5000.00 in 8 sec (PR 147)
OR      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 54) returned result 5000.00 in 6 sec (PR 178)
DE      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 125) returned result 5000.00 in 6 sec (PR 189)
DJ      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 77) returned result 5000.00 in 7 sec (PR 119)
RM      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 145) returned result 5000.00 in 6 sec (PR 165)
KM      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 26) returned result 5000.00 in 8 sec (PR 126)
IQ      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 13) returned result 5000.00 in 8 sec (PR 155)
LE      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 49) returned result 5000.00 in 8 sec (PR 140)
RK      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 169) returned result 5000.00 in 6 sec (PR 165)
ML      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 50) returned result 5000.00 in 8 sec (PR 163)
EP      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 55) returned result 5000.00 in 8 sec (PR 162)
JG      0       11:32:11        MQL5 Cloud Europe 2     genetic pass (0, 148) returned result 5000.00 in 6 sec (PR 160)

 

If I run it on my local machines each process takes 250-500 seconds but returns valid values:

EP      0       11:42:50        Core 6  genetic pass (0, 19) returned result 1100.03 in 274 sec
JK      0       11:42:50        Core 6  genetic pass (0, 32, 1) started
FS      0       11:42:53        Core 7  genetic pass (0, 17) returned result 6629.52 in 281 sec
OK      0       11:42:53        Core 7  genetic pass (0, 33, 1) started
ES      0       11:43:03        Core 4  genetic pass (0, 21) returned result 3355.33 in 279 sec
GD      0       11:43:03        Core 4  genetic pass (0, 34, 1) started
MR      0       11:43:05        Core 1  genetic pass (0, 23) returned result 6747.46 in 278 sec
QD      0       11:43:05        Core 1  genetic pass (0, 35, 1) started
ER      0       11:43:06        Core 3  genetic pass (0, 16) returned result 3065.16 in 296 sec
GE      0       11:43:06        Core 3  genetic pass (0, 36, 1) started
IM      0       11:43:07        Core 5  genetic pass (0, 18) returned result 2355.76 in 294 sec
ME      0       11:43:07        Core 5  genetic pass (0, 37, 1) started
JM      0       11:43:11        Core 2  genetic pass (0, 20) returned result 1195.93 in 290 sec
PF      0       11:43:11        Core 2  genetic pass (0, 38, 1) started
QL      0       11:43:19        Core 8  genetic pass (0, 22) returned result 3526.61 in 292 sec
IF      0       11:43:19        Core 8  genetic pass (0, 39, 1) started
IL      0       11:47:30        Core 6  genetic pass (0, 32) returned result 1020.05 in 280 sec
DG      0       11:47:30        Core 6  genetic pass (0, 40, 1) started
QO      0       11:47:33        Core 7  genetic pass (0, 33) returned result 1187.59 in 279 sec
MG      0       11:47:33        Core 7  genetic pass (0, 41, 1) started
KO      0       11:47:55        Core 4  genetic pass (0, 34) returned result 5986.58 in 291 sec
EP      0       11:47:55        Core 4  genetic pass (0, 42, 1) started
MN      0       11:47:58        Core 5  genetic pass (0, 37) returned result 7559.26 in 291 sec
JP      0       11:47:58        Core 5  genetic pass (0, 43, 1) started
FN      0       11:47:59        Core 1  genetic pass (0, 35) returned result 4596.16 in 294 sec
PQ      0       11:47:59        Core 1  genetic pass (0, 44, 1) started
QI      0       11:47:59        Core 3  genetic pass (0, 36) returned result 7176.59 in 292 sec
IQ      0       11:47:59        Core 3  genetic pass (0, 45, 1) started
NI      0       11:48:09        Core 2  genetic pass (0, 38) returned result 2856.78 in 297 sec
IR      0       11:48:09        Core 2  genetic pass (0, 46, 1) started
QH      0       11:48:09        Core 8  genetic pass (0, 39) returned result 3733.74 in 290 sec
HR      0       11:48:09        Core 8  genetic pass (0, 47, 1) started
OE      0       11:48:35        MacBook17PC     genetic pass (0, 24) returned result 4288.10 in 460 sec
NQ      0       11:48:35        MacBook17PC     genetic pass (0, 48, 1) started
PG      0       11:48:37        MacBook17PC     genetic pass (0, 25) returned result 3521.48 in 460 sec
GP      0       11:48:37        MacBook17PC     genetic pass (0, 49, 1) started
EI      0       11:48:39        MacBook17PC     genetic pass (0, 29) returned result 2567.24 in 453 sec
IR      0       11:48:39        MacBook17PC     genetic pass (0, 50, 1) started
FI      0       11:48:41        MacBook17PC     genetic pass (0, 28) returned result 185.82 in 456 sec
ED      0       11:48:41        MacBook17PC     genetic pass (0, 51, 1) started
NL      0       11:48:43        MacBook17PC     genetic pass (0, 26) returned result 2232.10 in 461 sec
RG      0       11:48:43        MacBook17PC     genetic pass (0, 52, 1) started
PN      0       11:48:45        MacBook17PC     genetic pass (0, 27) returned result 4470.81 in 462 sec
OI      0       11:48:45        MacBook17PC     genetic pass (0, 53, 1) started
FP      0       11:48:47        MacBook17PC     genetic pass (0, 30) returned result 5117.27 in 456 sec
HK      0       11:48:47        MacBook17PC     genetic pass (0, 54, 1) started
GR      0       11:49:09        MacBook17PC     genetic pass (0, 31) returned result 567.35 in 470 sec

  

Of course I get charged for that useless results.

I tried both, the demo and the paid EA from the market, different days, daytimes, broker, all results were the same.

 

Any hints would be appreciated,

thanks!

 
Have you asked the seller ?
 

Right now, I got a similar problem with my EA. Whatever settings I test the cloud produces zero results with no trades, but the passes tested on my machine create results.

I fiddled around in the code and reduced the issue to the OnInit handler call of the custom indicators:

First version (original) - works fine in cloud:

   asHandle = iCustom(Symbol(), 0, "AbsoluteStrength_v2", PERIOD_CURRENT, as2_MathMethod, as2_ApplyTo, as2_EvaluaionPeriod, as2_PreSmoothingPeriod, as2_SmoothingPeriod, as2_SignalLinePeriod, as2_MAMode, as2_LevelsMode, as2_StrengthLevel, as2_WeaknessLevel, as2_LookBackPeriod, as2_UBandMultiplier, as2_LBandMultiplier);

Then I said to use the indicator from resources of EA, works fine in cloud:

   asHandle = iCustom(Symbol(), 0, "::Indicators\\AbsoluteStrength_v2", PERIOD_CURRENT, as2_MathMethod, as2_ApplyTo, as2_EvaluaionPeriod, as2_PreSmoothingPeriod, as2_SmoothingPeriod, as2_SignalLinePeriod, as2_MAMode, as2_LevelsMode, as2_StrengthLevel, as2_WeaknessLevel, as2_LookBackPeriod, as2_UBandMultiplier, as2_LBandMultiplier);

Then, to improve performance I said to only use the indicator when the user uses the signal - suddenly zero results in cloud, still works on my PC:

   (if entrySignal==AbsoluteStrength) asHandle = iCustom(Symbol(), 0, "::Indicators\\AbsoluteStrength_v2", PERIOD_CURRENT, as2_MathMethod, as2_ApplyTo, as2_EvaluaionPeriod, as2_PreSmoothingPeriod, as2_SmoothingPeriod, as2_SignalLinePeriod, as2_MAMode, as2_LevelsMode, as2_StrengthLevel, as2_WeaknessLevel, as2_LookBackPeriod, as2_UBandMultiplier, as2_LBandMultiplier);

NOW comes the fun part, I then went back to version two, taking away the if function, but the cloud still refused to create results. Then I went back to original version and the cloud still refused to trade, while it all worked fine on my machine. Something strange is going on.

 

Okay, I really don't knoq what's going on here. Now I can't get it back to work. Whatever version I chose, even older ones that worked fine back in the days doesnt work in the cloud anymore, but only on my PC.

Please note: This issue is present for me since one week or so. I first thought it was a problem in my code (that haven't changed since this started to happen) and I tried to figure it out, but now that even older versions don't work anymore, I highly believe that it's an issue with MT5 or the cloud service. But it's strange that other EAs work, and that my EA worked in the beginning, but dont work now anymore and that they still work on my machine but not in the cloud.

Distributed Computing in the MQL5 Cloud Network
Distributed Computing in the MQL5 Cloud Network
  • cloud.mql5.com
Connect to the MQL5 Cloud Network (Cloud Computing) and earn extra income around the clock — there is much work for you computer!
 

I am in contact with the seller. But since it works on my machines I think it's not up to the seller. 

There was a bug in the previous build of MT5 (868) which made it impossible to backtest at all, build 871 fixed at least the local backtest. The error messages in that case were

QL      0       17:09:17        Core 1  2013.10.21 00:00:00   Alert: Error Creating Handles for indicators xzy. error: 4802!! Restart your EA again.
KP      0       17:09:17        Core 1  2013.10.21 00:00:00   Alert: Error Copying indicator buffer xzy. error: 4807!! EA won't trade this tick or bar.
GS      0       17:09:17        Core 1  2013.10.21 00:00:20   Alert: Error Copying indicator buffer xzy. error: 4807!! EA won't trade this tick or bar.
KE      0       17:09:17        Core 1  2013.10.21 00:00:40   Alert: Error Copying indicator buffer xzy. error: 4807!! EA won't trade this tick or bar.

 

 When connecting to the MQL servers I get the message "MQL5 Cloud Europe 2 authorized (server build 871)" which is the most recent version without the bug. It's possibly related to the cloud machines and their versions but thats something I cant find out by myself. The weird thing is that there is no error message at all. If you start a long running test without having a peed into the logfiles you will get a lot of trash as result and even charged for this...

Distributed Computing in the MQL5 Cloud Network
Distributed Computing in the MQL5 Cloud Network
  • cloud.mql5.com
Connect to the MQL5 Cloud Network (Cloud Computing) and earn extra income around the clock — there is much work for you computer!
 
crowstone:

I am in contact with the seller. But since it works on my machines I think it's not up to the seller.....

Then there is still the question why it happens to some EAs.

I tested around some more and now finally figured the cause of the problem in my EA at least.

All the EAs I tested and worked in the cloud did not use special indicators put into the resources of the EA. I build some simple testing EAs with standard and custom indicators, but calling them normally from the folder.

But as soon as I call them from resources it suddenly failed to do calculations in the cloud.

So in my case it comes down to this critical part:

"::Indicators\\AbsoluteStrength_v2"

If I do it normally it works fine, if I call it from resources, calculations in cloud fails.

Unfortunately this call is critical for selling in the market and for users to test the products.

 

Ok, I can confirm it now, I build another simple test EA using a custom indicator and calling this indicator from EAs resources.

adding to resources:

#resource "\\Indicators\\iTC_iMA.ex5"  

calling:

         ima_handle=iCustom(Symbol(),Period(),"::Indicators\\iTC_iMA",iMA_shift,iMA_method,iMA_price);
         if (ima_handle<0)
           {
            Alert("Error Creating Handles for ima_indicator - error: ",GetLastError(),"!!");
            return(INIT_FAILED);
           }

The cloud does not pass OnInit, while my PC does.

When I call the indicator normally from the folder it all works fine.

This must be a bug in MT5 (likely) or they changed the way custom indicators are put into/called from resources without telling the developers (very unlikely).

 
crowstone:

I am in contact with the seller. But since it works on my machines I think it's not up to the seller. 

There was a bug in the previous build of MT5 (868) which made it impossible to backtest at all, build 871 fixed at least the local backtest. The error messages in that case were

 

 When connecting to the MQL servers I get the message "MQL5 Cloud Europe 2 authorized (server build 871)" which is the most recent version without the bug. It's possibly related to the cloud machines and their versions but thats something I cant find out by myself. The weird thing is that there is no error message at all. If you start a long running test without having a peed into the logfiles you will get a lot of trash as result and even charged for this...

This is why I am asking about the seller, is it that he has the same problem? If it's a bug in MT5/Cloud, it have to be reproducible.
 
Klammeraffe:

Ok, I can confirm it now, I build another simple test EA using a custom indicator and calling this indicator from EAs resources.

adding to resources:

calling:

The cloud does not pass OnInit, while my PC does.

When I call the indicator normally from the folder it all works fine.

This must be a bug in MT5 (likely) or they changed the way custom indicators are put into/called from resources without telling the developers (very unlikely).

Maybe you can try to use something like below to see if it's a problem with the build as crowstone suggested.

if(TerminalInfoInteger(TERMINAL_BUILD)<871) return(INIT_FAILED);
 
angevoyageur:
This is why I am asking about the seller, is it that he has the same problem? If it's a bug in MT5/Cloud, it have to be reproducible.

In my case it is reproducable. Even very easy as it seem that I have found the cause of the problem.

 
angevoyageur:

Maybe you can try to use something like below to see if it's a problem with the build as crowstone suggested.

Ok I will try that.

However, that would imply that every provider I get connected with has not yet updated it's build because all passes fail. Which is pretty unlikely.


UPDATE: Okay, I took four tests, conclusion:

Test decription
Result
  • all passes get calculated fine
  • simple custom indicator EA calling the indicator from the resources of the EA
  • all cloud calculated passes fail OnInit with an error message like that:
    2013.11.10 20:30:44    MQL5 Cloud Europe    pass 33 tested with error "OnInit failed" in 422 ms (PR 114)
  • passes calculated on my machine get calculated fine
  • simple custom indicator EA, prior to calling the indicator, build no. gets checked for being smaller then 871, then custom indicator gets called from terminals installation folder
  • all passes get calculated fine
  • simple custom indicator EA, prior to calling the indicator, build no. gets checked for being smaller then 871, then custom indicator gets called from EAs resources
 
  • all cloud calculated passes fail OnInit with an error message like that:
    2013.11.10 20:38:35    MQL5 Cloud Europe    pass 4 tested with error "OnInit failed" in 359 ms (PR 155)
  • passes calculated on my machine get calculated fine
CONCLUSIONThe builds of the cloud agents are fine e.g. all agents seem to have updated their clients, however it's still the calling of the indicator that is causing trouble!
Reason: