Files
xMQL4/Docs/Samples/ArraySetAsSeries.md
T
2024-01-25 04:03:36 +03:30

800 B

ArraySetAsSeries

The function sets the AS_SERIES flag to a selected object of a dynamic array, and elements will be indexed like in timeseries.

bool ArraySetAsSeries( const void& array[], // array by reference bool flag // true denotes reverse order of indexing );

Parameters

array[]

[in][out] Numeric array to set.

flag

[in] Array indexing direction.

Return Value

The function returns true on success, otherwise - false.

Note

The AS_SERIES flag can't be set for multi-dimensional arrays or static arrays (arrays, whose size in square brackets is preset already on the compilation stage). Indexing in timeseries differs from a common array in that the elements of timeseries are indexed from the end towards the beginning (from the newest to oldest data).