Hello, forexbob1970. Thanks for sharing.
From one layman to the other ;), as to your question of ranking, why don't you save the values into an array and then apply a ranking algorithm?
There must be plenty of ranking algos on the internet.
Please let me know if such an idea works.
Cheers
forexbob1970, I have a better idea: try the ArraySort() function.
https://docs.mql4.com/array/arraysort
Let me know how it goes.
Cheers
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
This is following on from a recent post
I built this little indicator with some valued help to measure in my eyes, a pairs "strength". Use it much like an RSI or Stochs. But that's another topic.
Now, as I'm happy to admit, I'm not too clever at this programming gig. My goal here is to build a currency strength meter. So from this above code, I built this indicator to measure a single currency strength using the iCustom function
Do this across the majors and I can now build my meter which looks like this
Now whether what I've done works for the right reasons or wrong. Whether the maths is flawed in the logic. Etc... that's up for critisim and I'm happy to hear veiws.
But for myself, it returns a value I can use. And the goal of the 2nd and 3rd codes was to prove that using the iCustom function I can call upon these values generated by the 1st code to reference in an EA. Cause remember, I'm just not skilled enough to build these calculations into a single indicator or bot.
I'm also not clever enough to know how to rank the values from high to low. And that's my question and hoping someone can help out. Say I'm using the second code, I get a series of values like 3.4, 5.8, 4.6, 6.4, 5.3 & 6.1 returned. What's the best way to organize them so I can rank them from high to low ie, 6.4, 6.1, 5.8, 5.3, 4.6 & 3.4
Many thanks in advance