MQL4 Reference Array Functions ArrayCopySeries
ArrayCopySeriesCopies a series array to another one and returns the count of the copied elements.
Parameters array[] [out] Destination array of double type. series_index [in] Series array identifier. It can be any of the Series array identifier enumeration values. symbol [in] Symbol name. timeframe [in] Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe. Returned value The function returns copied elements amount, or -1 if failed. If data are copied from another chart with different symbol and/or timeframe, it is possible that the necessary data will lack. In this case, error ERR_HISTORY_WILL_UPDATED (4066 - requested history data under updating) will be placed into the last_error variable, and there will be necessary to retry copying after a certain period of time. Note There is no real memory allocation for data array and nothing is copied. When such an array is accessed, the access is redirected. Excluded are arrays that are assigned as indexed ones in custom indicators. In this case, data are really copied. If series_index is MODE_TIME, the array to be passed to the function must be of the datetime type. Example:
|