Lipi Reference Lipi

Functions

talib.percentile_nearest_rank()

Calculates percentile using method of Nearest Rank.

Syntax

                talib.percentile_nearest_rank(series float source, series int length, series float percentile) → series float
              

Arguments

source required series float Series of values to process (source).
length required series int Number of bars back (length).
percentile required series float Percentage, a number from range 0..100.

Return Type

series float

Example


          indicator("Percentile Linear Interpolation", overlay=true)
length = input(20, "Lookback Period")
percentile = input(75, "Percentile")
source = input(hlc3, "Source")
percentileValue = ta.percentile_linear_interpolation(source, length, percentile)
plot(percentileValue, color=color.blue, title="75th Percentile", linewidth=2)
plot(close, color=color.gray, style=plotStyle.scatter, title="Price")
plot(percentileValue, color=color.blue, title="75th Percentile")