I have probably misunderstood the documention for the ArraySort() function in MQL5.
https://www.mql5.com/en/docs/array/arraysort states "Sorts the values in the first dimension of a multidimensional numeric array in the ascending order".
When I use this function, my arrays are sorted with Array being the largest value and Array[ArrayLength-1] the smallest:
ARRAY SORT TEST
ArrayMaximum = 0
ArrayMinimum = 10
Array Sorted in Descending Order. Array = 19.00000000001345
This result (at least for me) suggests that the sorting of largest to smallest is in Descending order.
Does anyone have a view on this?
Thanks in advance.
If the Array is SetAsSeries, the ArraySort() function effectively sorts it in the opposite direction.
I suppose this is what the following line in the documentation means:
An array is always sorted in the ascending order irrespective of the AS_SERIES flag value.