This could be useful to many ;) well done ;)
What is this negativity?! I dont know the reason of bad stars.
If you have any suggestions or improvement please add them to the discussion.
Update 10 April 2022
More optimized implementation with a faster speed.
Faster:
//--- copy back from temp to arr #ifdef __MQL5__ ArraySwap(arr, temp); #else // #ifdef __MQL5__ ArrayCopy(arr, temp); #endif // #ifdef __MQL5__ #else
#include <RadixSort.mqh> // https://www.mql5.com/en/code/38763 void OnStart() { int Array[]; RadixSort(Array); // array out of range in 'RadixSort.mqh' }
I have included these two improvements in the published code, as you suggested.
Thank you!
Update 26 November 2022
More optimized implementation with a faster speed.
Cleaner code and minor bug fixes.
Special thanks to fxsaber and Dominik Christian Egert
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
Radix sort (The fastest numeric sort):
Sorts the values of a one-dimensional numeric array in the ascending order. It is 3-10 times faster than any other sorting algorithm.
Author: amrali