MqlRates Issue My ea was working perfectly until the 2nd of November(working for almost a year without an issue). Since then randomly I'm getting Array Out of Range.

 

My ea was working perfectly until the 2nd of November(working for almost a year without an issue). Since then randomly I'm getting Array Out of Range

So I have changed the code to this:

MqlRates PriceInformation[];
   
   int Data = CopyRates(Symbol(),Period(),0,10,PriceInformation);
   if(Data<=0)
   {
      Print("Error copying price data ",GetLastError());
   }

I'm still randomly getting error about Price Data. Any ideas?
Thanks in advance

 

Same problem, but much more I am having, not only from CopyRates problem, but also several other functions. EAs that I run stable for several years are working quite strange now.

Hope somebody can report to metaquotes to fix the problem as soon as possible.

 
I'm also getting "Error Copying Price Data 4401"
But I haven't changed anything to my code.
 
Christos Papageorgiou:

My ea was working perfectly until the 2nd of November(working for almost a year without an issue). Since then randomly I'm getting Array Out of Range

So I have changed the code to this:

I'm still randomly getting error about Price Data. Any ideas?
Thanks in advance

"Array out of range" is a problem in your code, you need to fix it.

Error 4401 can always happen, but it seems you are right, it happens more often in recent builds. Did you try the last beta (1943) ?

 
Alain Verleyen:

"Array out of range" is a problem in your code, you need to fix it.

Error 4401 can always happen, but it seems you are right, it happens more often in recent builds. Did you try the last beta (1943) ?

Thank you very much for your comment Alain. The code was working perfectly before. And now is working again without issue. (Before the signal sections to avoid any issues I'm already checking every array to see if there is any issue). I assume it was some kind of broker's problem cause the problem was just for a few days and only with MqlRates for e.g. PriceInformation[0] - servers lag something like that.