BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScript
  New Posts New Posts RSS Feed: How do you rank a series of values?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

How do you rank a series of values?

 Post Reply Post Reply
Author
Message / View First Unread Post
cudderbean View Drop Down
Regular
Regular
Avatar

Joined: 02 Oct 2006
Location: Thailand
Posts: 40
Post Options Post Options   Quote cudderbean Quote  Post ReplyReply Direct Link To This Post Topic: How do you rank a series of values?
    Posted: 16 Dec 2016 at 9:56am
I am trying to code for the 3rd part of Connors RSI indicator..have managed the first two parts. Will post complete indicator here if anyone can help me with the 3rd.

The 3rd part of his indicator deals with today's rate of change over a one day close as a percenatge

roc(c,1,percent)

Connors then ranks a 100 days worth of these one day Rates of Change in order from the worst ROC fall in the last 100 days to the highest ROC gain in the last 100 days. He then literally gives each a numerical rank value...the lowest one day down ROC fall eg on CBA in the last 100 days is -2.57% (that becomes zero in an ordinal ranking scale)  the highest up ROC 3.086% (that becomes 100 in an ordinal ranking scale..over 100 days). The indicator is trying to evaluate just how serious this ROC is in the 100 day scale of things. Today's (15 Dec 16) CBA one day ROC is -.6652%. I want to know where that ranks in the scale of 100 days of ROC values in between -2.57% and 3.086%

I can sort of fudge it on BC using the MEDIAN function multiple times, but is there a better way where you can literally rank any series of values from zero (or lowest) to 100?

Ambiboker have the code PercentRank(ROC1, 100) . Does BC have an equivalent?
https://www.mta.org/wp-content/uploads/2015/11/1212-connors.pdf

Thank you for your help.


Back to Top
rcameron View Drop Down
Moderator Group
Moderator Group


Joined: 04 Aug 2008
Posts: 21
Post Options Post Options   Quote rcameron Quote  Post ReplyReply Direct Link To This Post Posted: 20 Dec 2016 at 10:30am
Sorry, don't think that is currently possible in Bullscript. Perhaps a suggestion to Brendon to include it as a standard indicator. I requested this some time ago, but  multiple requests will help. Rod
Back to Top
cudderbean View Drop Down
Regular
Regular
Avatar

Joined: 02 Oct 2006
Location: Thailand
Posts: 40
Post Options Post Options   Quote cudderbean Quote  Post ReplyReply Direct Link To This Post Posted: 20 Dec 2016 at 7:43pm
Thank you, rcameron. I will put a request in as you suggested.

I notice Excel have the rank function too {  =RANK(number,ref,[order])  } so I can easily manage the calculation for all 3 parts of the Connors RSI there. But it is always good to try these things out on BC first and perhaps also backtest the reliability in Tradesim.

Thanks again, and all the best for Christmas.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz