Automated history downloader

To add comments, please log in or register
pstar
103
pstar  

Hello, suppose an indicator requires access to data 1H, 4H, 1D from all 28 pairs - in other words the program requires your brokers history folder to have 28x3=84 history logs in it to function properly (USDJPY60.hst, USDJPY240.hst, USDJPY1440.hst, ... etc). Is there an automated way to download these pairs' history logs WITHOUT having to open all 28 pairs and manually click on "1H","4H","1D" a total of 84 times? 

Can this be written somehow into the source code?

Thanks

Rodrigo Malacarne
Moderator
11380
Rodrigo Malacarne  
pstar:

Hello, suppose an indicator requires access to data 1H, 4H, 1D from all 28 pairs - in other words the program requires your brokers history folder to have 28x3=84 history logs in it to function properly (USDJPY60.hst, USDJPY240.hst, USDJPY1440.hst, ... etc). Is there an automated way to download these pairs' history logs WITHOUT having to open all 28 pairs and manually click on "1H","4H","1D" a total of 84 times? 

Can this be written somehow into the source code?

Thanks

Hello pstar,

This can be perfectly done programmatically.

Please take a look here: https://www.mql5.com/pt/docs/series/timeseries_access

Specifically, please take a look at the function CheckLoadHistory( ).

Regards,
Malacarne

Documentação sobre MQL5: Séries Temporais e Acesso a Indicadores / Organizando Acesso aos Dados
Documentação sobre MQL5: Séries Temporais e Acesso a Indicadores / Organizando Acesso aos Dados
  • www.mql5.com
Séries Temporais e Acesso a Indicadores / Organizando Acesso aos Dados - Referência sobre algorítimo/automatização de negociação na linguagem para MetaTrader 5
Alain Verleyen
36610
Alain Verleyen  
Rodrigo Malacarne:

Hello pstar,

This can be perfectly done programmatically.

Please take a look here: https://www.mql5.com/pt/docs/series/timeseries_access

Specifically, please take a look at the function CheckLoadHistory( ).

Regards,
Malacarne


I am afraid the question is about MT4 Rodrigo.

pstar
103
pstar  
Alain Verleyen:

I am afraid the question is about MT4 Rodrigo.


Thanks Rodrigo, I will read over the article. Alain is correct, this is regarding MT4 (indicator is in MQL4 language) 

Fernando Carreiro
4765
Fernando Carreiro  
pstar: Thanks Rodrigo, I will read over the article. Alain is correct, this is regarding MT4 (indicator is in MQL4 language) 

Even though @Rodrigo Malacarne may have given you the wrong links (For MT5 in Portuguese), his "yes" answer is correct.

It can be done on MT4 as well, but please note that it is not a trivial task. It will be quite difficult for a beginner to accomplish, especially if they have never coded before in any language.

I consider that task as an "Advanced" task for experienced coders. I say this because even if the functions for handling the task are quite reasonably understandable (depending on your coding knowledge), it still needs some expert handling of errors (4066 and 4073) that occur because of the delays in downloading the data.

What is your level of coding knowledge in general and for MQL4?

To add comments, please log in or register