Lipi Reference
Lipi

Functions

talib.percentile_linear_interpolation()

The requested `percentile` of `source` over `length` bars, interpolating between the two values that straddle the rank. Because it interpolates, the result need not be a value that actually occurred in the window.

Syntax

                talib.percentile_linear_interpolation(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


          //@lipi=2
indicator("talib.percentile_linear_interpolation Example", overlay=true)
p90 = talib.percentile_linear_interpolation(close, 50, 90)
p10 = talib.percentile_linear_interpolation(close, 50, 10)
plot(p90, title="90th Percentile", color=color.green)
plot(p10, title="10th Percentile", color=color.red)