From the diary of the worlds worst programmer part 2
forexbob1970, I have a better idea: try the ArraySort() function.
https://docs.mql4.com/array/arraysort
Let me know how it goes.
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 agree to website policy and terms of use
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