Skip to content

Timeseries and Indicators Access

Access to Timeseries and Indicator Data

These are functions for working with timeseries and indicators. A timeseries differs from the usual data array by its reverse ordering - elements of timeseries are indexed from the end of an array to its begin (from the most recent data to the oldest ones). To copy the time-series values and indicator data, it’s recommended to use dynamic arrays only, because copying functions are designed to allocate the necessary size of arrays that receive values.

FunctionAction
SeriesInfoIntegerReturns information about the state of historical data
BarsReturns the number of bars count in the history for a specified symbol and period
BarsCalculatedReturns the number of calculated data in an indicator buffer or -1 in the case of error (data hasn’t been calculated yet)
IndicatorCreateReturns the handle to the specified technical indicator created by an array of MqlParam type parameters
IndicatorParametersBased on the specified handle, returns the number of input parameters of the indicator, as well as the values and types of the parameters
IndicatorReleaseRemoves an indicator handle and releases the calculation block of the indicator, if it’s not used by anyone else
CopyBufferGets data of a specified buffer from a specified indicator into an array
CopyRatesGets history data of the Rates structure for a specified symbol and period into an array
CopyTimeGets history data on bar opening time for a specified symbol and period into an array
CopyOpenGets history data on bar opening price for a specified symbol and period into an array
CopyHighGets history data on maximal bar price for a specified symbol and period into an array
CopyLowGets history data on minimal bar price for a specified symbol and period into an array
CopyCloseGets history data on bar closing price for a specified symbol and period into an array
CopyTickVolumeGets history data on tick volumes for a specified symbol and period into an array
CopyRealVolumeGets history data on trade volumes for a specified symbol and period into an array
CopySpreadGets history data on spreads for a specified symbol and period into an array
CopyTicksGets ticks in the MqlTick format into ticks_array
CopyTicksRangeGets ticks in the MqlTick format within the specified date range to ticks_array
iBarsReturns the number of bars of a corresponding symbol and period, available in history
iBarShiftReturns the index of the bar corresponding to the specified time
iCloseReturns the Close price of the bar (indicated by the ‘shift’ parameter) on the corresponding chart
iHighReturns the High price of the bar (indicated by the ‘shift’ parameter) on the corresponding chart
iHighestReturns the index of the highest value found on the corresponding chart (shift relative to the current bar)
iLowReturns the Low price of the bar (indicated by the ‘shift’ parameter) on the corresponding chart
iLowestReturns the index of the smallest value found on the corresponding chart (shift relative to the current bar)
iOpenReturns the Open price of the bar (indicated by the ‘shift’ parameter) on the corresponding chart
iTimeReturns the opening time of the bar (indicated by the ‘shift’ parameter) on the corresponding chart
iTickVolumeReturns the tick volume of the bar (indicated by the ‘shift’ parameter) on the corresponding chart
iRealVolumeReturns the real volume of the bar (indicated by the ‘shift’ parameter) on the corresponding chart
iVolumeReturns the tick volume of the bar (indicated by the ‘shift’ parameter) on the corresponding chart
iSpreadReturns the spread value of the bar (indicated by the ‘shift’ parameter) on the corresponding chart
Last updated on