Download MetaTrader 5

Okease Help - Sort

To add comments, please log in or register
Do you need OpenCL? MQL5 can provide it!
Khurram Mustafa
27632
Khurram Mustafa 2016.03.16 17:18 

I want to use sorting in my indicator but i am not get it

How to sort our values in ascending order

Please guide

Thank you 

Snelle Moda
602
Snelle Moda 2016.03.16 17:22  

Hi.

Copy your indicator values to a new array and sort this array with the ArraySort() function.

https://www.mql5.com/en/docs/array/arraysort

Documentation on MQL5: Array Functions / ArraySort
Documentation on MQL5: Array Functions / ArraySort
  • www.mql5.com
Array Functions / ArraySort - Reference on algorithmic/automated trading language for MetaTrader 5
Marco vd Heijden
Moderator
4685
Marco vd Heijden 2016.03.16 17:22  
MODE_ASCEND 
MODE_DESCEND 
Khurram Mustafa
27632
Khurram Mustafa 2016.03.16 17:33  
Snelle Moda:

Hi.

Copy your indicator values to a new array and sort this array with the ArraySort() function.

https://www.mql5.com/en/docs/array/arraysort

Thank You for share, 
To add comments, please log in or register