Scripts: downloadhistory.mq5

 

downloadhistory.mq5:

The script downloads historical data (for the current symbol), available at trade server.

The download progress is plotted using the CProgressBar class, proposed in The Price Histogram (Market Profile) and its implementation in MQL5 article.

If error it prints error code (see CheckLoadHistory in Organizing Data Access)

Author: Aleksey

downloadhistory script demo

 

thanks for the code, if you have free time, please make the code in the form of a class that would be responsible for loading and control of history loading - a necessary thing.

HI: you can load the whole history for all selected instruments like this: https://www.mql5.com/ru/forum/2485 - imho faster and easier.

 

Simple to make complex and complex to make simple - my option is the first, yours is the second. Your variant is very short in volume and was already taken to make a download based on it. But still stopped on the original one. Reasons:

- there is already error handling, I would have to create my own handlers and the code would probably grow as well;

- it is necessary for loading to work inside Expert Advisors and not to create additional charts and timers.

I have made the class, we are waiting for it to be published.

 
gdtt:

- It is necessary to make the download work inside EAs and not to create additional charts and timers.

Yes, but the purpose of my code was much more primitive - to have fresh history while I am working with the code, i.e. all symbols from the market overview are automatically downloaded, it is convenient to use it to download history from different brokerage companies.

Your class has been published, thanks, I'll have a look at it

 

When I try to compile this script it gives an error on line 102:

'SERIES_SYNCRONIZED' - undeclared identifier    downloadhistory.mq5    (line 102, column 46)

It appears that what should be "SERIES_SYNCHRONIZED" is spelled as "SERIES_SYNCRONISED" instead (with the "H" missing).

If you type the "H" in correctly then it compiles properly!

 
hatlle:

When I try to compile this script it gives an error on line 102:

It appears that what should be "SERIES_SYNCHRONIZED" is spelled as "SERIES_SYNCRONISED" instead (with the "H" missing).

If you type the "H" in correctly then it compiles properly!

You should also notice that this code was published in Feb 28th 2011. At that time, of course MT5 was a different build. In Sep 6th 2012, on MT build 695 the err was spotted and corrected. See it here point 7 (https://www.mql5.com/en/forum/53/page13#comment_307478). Unfortunally, the bug in this code remain ... as a remainder ;D
 

A very usefull tool for downloading data.

just to make a confirmation. I drag the script to the current chart. but can only see a message flashed in a very short time.I can only move the chart back to 2012.10.2. This happened for all symbols. Does it mean the trading server will only provide history from 202.10.2? thank you.

 

Ok cool thanks but where does it dump the historical data?

I can't find any records? Where can i find the data?