Downloading history data via EA

 

Hello,

 I would like to ask you whether it's possible to download history data to the metatrader through EA? I have some script which require history data and if they are not available it makes error. The only known way which I know how to download history data is shown in the image below.

Metatrader history data download 

 

Thank you for any advice.

 

Regards,

 

Lukas 



 

just an idea

while (iClose(string symbol, int timeframe, 0) == 0.0)
   Sleep(200);
Reason: