Get bars from the MetaTrader 5 terminal starting from the specified index.
[in] Financial instrument name, for example, "EURUSD". Required unnamed parameter.
[in] Timeframe the bars are requested for. Set by a value from the TIMEFRAME enumeration. Required unnamed parameter.
[in] Initial index of the bar the data are requested from. The numbering of bars goes from present to past. Thus, the zero bar means the current one. Required unnamed parameter.
[in] Number of bars to receive. Required unnamed parameter.
Returns bars as the numpy array with the named time, open, high, low, close, tick_volume, spread and real_volume columns. Returns None in case of an error. The info on the error can be obtained using last_error().
See the CopyRates() function for more information.
MetaTrader 5 terminal provides bars only within a history available to a user on charts. The number of bars available to users is set in the "Max. bars in chart" parameter.