Some users have expressed interest in a Percent Rank indicator or Percentile Rank indicator so we have programmed one you can use. There are many definitions of percent rank functions. This one doesn’t work exactly like the Excel function because it doesn’t interpolate. However, for trading where the data isn’t sparse as opposed to evaluating things like test scores, it should give you results comparable in effectiveness. The function is called FractionRank. It computes as follows:
Lookback is the window size (not including the current bar), but if lookback is zero all previous bars are included in the window. FractionRank returns the count of values in the window which are less than the current value, divided by the count of values in the window not equal to the current value. If all values in the window are equal to the current value, nothing (null) is returned.
To install the FractionRank indicator, click here to download. After you download it, unzip the contents of the ZIP file to your NeuroShell/Template folder and restart NeuroShell. The function FractionRank will be found in the “Custom Indicators” category.
The PowerBasic source code is the .bas file, which is not needed unless you want to make changes in how the indicator works.