How to display multi stocks ROC on chart panel by value ascending order ?

I have built the ROC chart for multi stocks / sector but can not display it by ascending order of ROC's value instead of stock sequence . Can anyone help me the solution ?

1 Like

All you need is in the manual :wink:
Included example should help you a lot. Hints:

  • use StaticVarGenerateRanks to compute stock ranks

  • retrieve the ordered list of symbols using StaticVarGetRankedSymbols

  • iterate through this list to get stock names & display them

Hope it helps.

Also, assuming that original poster wants to sort by most recent value, one can just put those recent values in array and sort those using index mode AFL Function Reference - SORT later those indices would represent the order in which to display symbol names.

1 Like

Thanks for your support, I'd already to solve the matter following your advise .

Thanks for your advise !

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.