Copies a series array to another one and returns the count of the copied elements.
[out] Destination array of double type.
[in] Series array identifier. It can be any of the Series array identifier enumeration values.
[in] Symbol name.
[in] Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
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.
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.