You can't use the built in sort with structs/classes. Instead, you have to use my insertion sort (non-pointer) method. (2016)
Sort multiple arrays - MQL4 programming forum #9 (2016)
Array or not to array - Trading Positions - MQL4 programming forum - Page 2 #20.4 (2016)
Sort multiple arrays - MQL4 programming forum #9 (2016)
Array or not to array - Trading Positions - MQL4 programming forum - Page 2 #20.4 (2016)
Or (object pointer) CList method:
pass generic class data field - Swing Trades - MQL4 programming forum
William Roeder #:
You can't use the built in sort with structs/classes. Instead, you have to use my insertion sort (non-pointer) method. (2016)
Sort multiple arrays - MQL4 programming forum #9 (2016)
Array or not to array - Trading Positions - MQL4 programming forum - Page 2 #20.4 (2016)
You can't use the built in sort with structs/classes. Instead, you have to use my insertion sort (non-pointer) method. (2016)
Sort multiple arrays - MQL4 programming forum #9 (2016)
Array or not to array - Trading Positions - MQL4 programming forum - Page 2 #20.4 (2016)
Or (object pointer) CList method:
pass generic class data field - Swing Trades - MQL4 programming forum
The algorithm I use is Merge Sort and Quick Sort, you can apply it to the way you mentioned
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Ascending Sort A Struct Array By A Field Example:
This is an example of ascending sort a struct list by a field. You can find out and customize the above algorithm depending on the purpose of use, this is the most basic example is also a direction to resolve the arrangement in an array of structure. The algorithm used in this example is Quick Sort and Merge Sort.
Author: Le Minh Duc