Setting time for requesting data of "Copy* functions"

 

Hi ladies and gentlemen,

   I'm writing a code in which I need to work over a lot of assets (symbols), implying to a lot of interactions with the server. Some request performed by functions like CopyRates, CopyLow and CopyHigh aren't supplied and the functions keep trying retrieving data. CodeErrors 4401 (Requested history not found) and 4022* (refering to system busy system, I've only found it in Mql4 reference! Perheaps it didn't mean this) were reported. I would like to know if there is a way to set thewaiting response time for those functions. I didn't find nothing related to in Mql5 reference and duckduckgo.

   Socket functions reseambles that, but I don't find anything directly reletated to that.

  I believe giving a short time to those procedures, the code will operate functionally.

My apologies for asking again and all regards.

Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
  • www.mql5.com
//| Expert initialization function                                   | //| Expert deinitialization function                                 | //| Expert tick function                                             | //| test1                                                            |...
 
AnarcoPhysic:

Hi ladies and gentlemen,

   I'm writing a code in which I need to work over a lot of assets (symbols), implying in a lot of interactions with the server. Some request performed by functions like CopyRates, CopyLow and CopyHigh aren't supplied and the functions keeps trying retrieving data. Erros code 4401 (Requested history not found) and 4022* (refering to system busy system, I've only found it in Mql4 reference! Perheaps it didn't mean this) were reported. I would like to know if there is a way to set this waiting response time. I didn't find nothing related to in reference and duckduckgo.

   Socket functions reseambles that, but I don't find anything directly reletated to that.

  I believe giving a short time to such function for retrieving data and failing in a more finite time, the code will operate functionally.

My apologies for asking again and all regards.

Don't even try to find an error number from mql5 in mql4 documentation (or forum, articles, etc...), they don't match.

Error 4022 :

Error 4022 means that during the execution of some built-in function a non-zero stop flag was detected. The stop flag is set when the tester is stopped (if testing), the chart is closed, the terminal is closed, the expert is removed from the chart etc, or there was some critical error .

No there is no way to set the "waiting response time".

On what symbol(s), using which broker, do you have problems ?

 
Alain Verleyen:

Don't even try to find an error number from mql5 in mql4 documentation (or forum, articles, etc...), they don't match.

Error 4022 :

No there is no way to set the "waiting response time".

On what symbol(s), using which broker, do you have problems ?

I don't have this information at first hand. I need to repeat the opearation (in pratice, I will need to wait for hours to get all problematic assets symbols). I can tell you only a few assets generate this frezeezing (the total of symbols is about 80.000, after filtering, we have about 600 (depending on the option - type of asset) and I estimate about 20 freezing symbols).

The scripts work over all assets machting a pattern. This would be sufficient to not invade the not "interesting zones" of my broker. I am using the MetaTrader5 released by  ModalMais (Broke-Dealer). (I am assuming broke and broke-dealer as synonymous nominally.)

The erro 4022 is not documented here. It wasn't my fault, wasn't it?

Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings
Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings
  • www.mql5.com
Constants, Enumerations and Structures / Codes of Errors and Warnings - Reference on algorithmic/automated trading language for MetaTrader 5
 
AnarcoPhysic:

I don't have this information at first hand. I need to repeat the opearation (in pratice, I will need to wait for hours to get all problematic assets symbols). I can tell you only a few assets generate this frezeezing (the total of symbols is about 80.000, after filtering, we have about 600 (depending on the option - type of asset) and I estimate about 20 freezing symbols).

The scripts work over all assets machting a pattern. This would be sufficient to not invade the not "interesting zones" of my broker. I am using the MetaTrader5 released by  ModalMais (Broke-Dealer). (I am assuming broke and broke-dealer as synonymous nominally.)

The erro 4022 is not documented here. It wasn't my fault, wasn't it?

A problematic asset symbol is "BALM3".


I realize I could working with very old data (a not existing product).

 
AnarcoPhysic:

I don't have this information at first hand. I need to repeat the opearation (in pratice, I will need to wait for hours to get all problematic assets symbols). I can tell you only a few assets generate this frezeezing (the total of symbols is about 80.000, after filtering, we have about 600 (depending on the option - type of asset) and I estimate about 20 freezing symbols).

The scripts work over all assets machting a pattern. This would be sufficient to not invade the not "interesting zones" of my broker. I am using the MetaTrader5 released by  ModalMais (Broke-Dealer). (I am assuming broke and broke-dealer as synonymous nominally.)

Is it demo or live account ? Do you have the same issue with XP broker ?

The erro 4022 is not documented here. It wasn't my fault, wasn't it?

Nobody said it was your fault.
 
Alain Verleyen:
Is it demo or live account ? Do you have the same issue with XP broker ?
Nobody said it was your fault.

A Live account!


I don't use XP broker.


It was a joke :-) (better this way)