Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Libraries | CDownLoadHistory class

The CDownLoadHistory class provides the methods of historical data downloading in two modes: "visual" and "silent".

1. Visual mode

The example of use of this mode is downloadhistoryvisualmode.mq5.

The "history download mode" input parameter can be one of two modes: "current symbol" or "all symbols from Market Watch window":

MetaTrader Experts, Indicators, Scripts and Libraries

For the "All symbols from Market Watch window" mode, it will show two progress bars:

 MetaTrader Experts, Indicators, Scripts and Libraries

For the case if the "current symbol" mode is selected, the single progress bar will be shown:

MetaTrader Experts, Indicators, Scripts and Libraries
 

It prints the results in "Experts" tab of "Toolbox" window:

MetaTrader Experts, Indicators, Scripts and Libraries
 

2. Silent mode

The result of downloading is availiable as a return code. The silent mode can be useful in programs, where visualization is not needed. See example in downloadhistorysilentmode.mq5 script.

It uses the CProgressBar class, described in The Price Histogram (Market Profile) and its implementation in MQL5.

304

Best MetaTrader Indicators + Profitable Expert Advisors