Array for distance of pips
-
Hello friends, I am making an array to show me the list of open trades of a currency.
When I want to order them, I only see the option to do it for the one that has more or less profit or the trade that is more or less old.

Is there any way to order the trades according to the pips that each one has?
Thank you very much
-
@ajmd97fx I have seen that in mql4 there is the parameter "arrayMaximum", but I don't know how to use it.
I would greatly appreciate someone helping me.Thank you very much
-
this is the link of the shared project
-
@ajmd97fx I think sorting your array would be nice
-
Yes, I think it must be that, but I don't know how to implement it, can you provide me with an example or an idea?
thank you very much -
@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 -
@roar I am not a programmer, I have modified a bit of code following some of your examples (many thanks;))
according to this example I understand how to order from highest to lowest.
what I don't know is how to tell it to order from highest to lowest according to the number of pips in each trade -
can someone help me with this array and arraymaximum function?
Thank you very much