one is a double, one is a string, you can't use 2D.
you have to keep both arrays independent and write your own sort swapping both.
Or alternately, create an index array
string pair[26] = ... double vola[26] = ... int order[26]; for (int kk=0; kk<26; kk++) { for (int ii=kk; ii>0 && vola[order[ii-1]] > vola[kk]; ii--) { order[ii]=order[ii-1]; // kk vola[kk] order[kk] vola[order[kk]] } // 0 3. 1 1. order[ii]=kk; // 1 1. 2 2. } // 2 2. 0 3. // pair[order[25]] is the most volatile @ vola[order[25]]

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
any help will be much appreciated.