- ago
I was searching through the available indictors for a function that would return percentrank of a time series. Example: assume rsi varies from 20 to 80 over the last 100 bars. Today the rsi is at 20 so it would return a 0 since that is the lowest value that occurred over the laokback period. The function would always return values bounded by 0-100. I found the finantic mp indicator but it does the inverse ( provide the percent rank as argument and it returns the correspond (rsi,etc) value. Is there an indicator I can use or just have to write my own? Thanks!
0
78
Solved
8 Replies

Reply

Bookmark

Sort
- ago
#1
You need to look in the QuickRef docs for the TimeSeries member functions. You'll find a function called PercentRank there. The Stochastic %K Oscillator may not be the most modern choice of stochastic indicators, but it's an old indicator you're probably already familiar with. The Stochastic %K indicator will not take TimeSeries (e.g. RSI) input.

If your intent is to use this with the RSI indicator, then you should be using the StochRSI indicator (not shown) instead. The PBFastOsc indicator (not shown) would be another stochastic indicator choice to consider.

CODE:
      public override void Initialize(BarHistory bars)       {          IndicatorBase rsi = RSI.Series(bars.Close, 22);          PlotIndicator(rsi);          TimeSeries rsiRank = rsi.PercentRank(22);          PlotTimeSeries(rsiRank, "RSI %rank", "RSI %rank");          IndicatorBase stochK = StochK.Series(bars, 22);          PlotIndicator(stochK);       }

0
Best Answer
- ago
#2
Thanks Superticker! I will check the quickref docs. I don't intend to use it with RSI, i was just providing that as an example.
0
- ago
#3
I'll add the moving percentile rank to finantic.Indicators, because it is a close relative to moving percentiles (MP Indicator)
----
Remark: There is a new indicator called "Portfolio Percentile Rank" (PFPR) included in build 6 of finantic.Indicators.
It does not return the rank relative to past values (see above) but instead the rank relative to all other symbols in a Portfolio/DataSet.
And while the former is just a (dynamic) distortion of the original indicator, the PFPR indicator will add new information and has just a one bar delay . I guess it will be way more useful than the moving percentile guys.
2
- ago
#4
Build 6 of finantic.Indicators is in the process of being published. I guess Milton delayed things a bit...
0
- ago
#5
QUOTE:
There is a new indicator called "Portfolio Percentile Rank" (PFPR) included in build 6 of finantic.Indicators.

I hope you included an example of using it with IndexLab. The advantage of employing this indicator with IndexLab is that IndexLab will cache results on disk so the composite result doesn't need to be recomputed all the time.
0
- ago
#6
It is patternrd after the IndexLab indicators but uses a different ( in Memory) caching mechanism.
This means: It is lightning fast, very low overhead compared to the original indicators. And no complicated if some recalculation is needed. It is all handeled automagically :)
2
- ago
#7
Build 6 has arrived.
0
- ago
#8
Thank you DrKoch! i look forward to the addition of the percentile rank indicator.
0

Reply

Bookmark

Sort