@ajmd97fx there's an example on the mql4 page:
//--- example of sorting of one dimensional array
double num_array[5]={4,1,6,3,9};
//--- now array contains values 4,1,6,3,9
ArraySort(num_array);
//--- now array is sorted 1,3,4,6,9
ArraySort(num_array,WHOLE_ARRAY,0,MODE_DESCEND);
//--- now array is sorted 9,6,4,3,1









