![]() When accessing to price data or indicator values from a mql4 program it should be remembered that their availability in a certain moment of time or starting from a certain moment of time is not guaranteed. Presence of data on HCC format or even in the prepared for using HC format does not always denote the absolute availability if these data to be shown in a chart or used in mql4 programs. The restriction set by this parameter is not strict, and in some cases the number of available bars for a timeframe can be a little more than the current parameter value. Volume of data requested from the server corresponds to the required number of bars of this timeframe with the "Max bars in charts" parameter taken into account. Additional price data are requested from the server, and timeseries are updated taking into account the new limitation, in case of either chart scroll to the area with no data, or when data are requested by mql4 program. Change of this parameter causes neither automatic referring to a server for additional data, nor forming of additional bars of timeseries. When setting a large value of this parameter, it should be remembered, that if deep history price data for small timeframes are available, memory used for storing timeseries and indicator buffers can become hundreds of megabytes and reach the RAM restriction for the client terminal program (2Gb for 32-bit applications of MS Windows).Ĭhange of the "Max bars in charts" comes into effect after the client terminal is restarted. This is valid for all available timeframes and serves, first of all, to save computer resources. The "Max bars in charts" parameter restricts number of bars in HC format available to charts, indicators and mql45 programs. It also leads to the recalculation of all indicators that implicitly use them as input data for calculations. Receipt of new data from a server calls automatic update of used price data in HC format of all timeframes. I.e., despite the fact that the unit data stored in HCC is one minute (M1), the availability of HCC data doesn't mean the availability of data on M1 timeframe as HC in the same volume. Rules of forming and accessing data are the same for all timeframes. For each timeframe, data are prepared regardless of whether there are ready data for other timeframes or not. If not called for a long time, they are released from RAM and saved into a file. To save resources, data on a timeframe are stored and saved in RAM only if necessary. Data are stored for further using in files with hc extension. The volume of data should not exceed the value of the "Max bars in charts" parameter. They are created upon a request of a chart or a MQL4 program. Data of HC format are timeseries that are maximally prepared for a quick access. Intermediate HCC files are used as the data source for building price data for requested timeframes in the HC format. ![]() Obtaining Data on a Necessary Timeframe out of Intermediate Data These files are used for preparing price data for all timeframes and are not intended for direct access. For example, the file named 2009.hcc in the EURUSD folder contains minute bars of EURUSD for year 2009. Each file stores data of minute bars for one year. For example, data on EURUSD received from the MetaQuotes-Demo server will be stored in terminal_directory \bases\MetaQuotes-Demo\history\EURUSD\.ĭata are written into files with. Data on each symbol are written into a separate folder: terminal_directory \bases\ server_name \history\ symbol_name. Storing Intermediate Dataĭata received from a server are automatically unpacked and saved in the HCC intermediate format. The mechanism of server reference for data doesn't depend on how the request has been initiated - by a user when navigating in a chart or in a program way in the MQL4 language. Data are received in the form of packed blocks of minute bars from the server upon the request of a terminal. To receive data, connection to the MetaTrader 4 trade server must be established. Receiving Data from a Trade Serverīefore price data become available in the MetaTrader 4 terminal, they must be received and processed. In this section questions connected with obtaining, storing and requesting price data ( timeseries) are considered.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |