Skip to content
Algo Trade Analytics Docs

ta.percentile_linear_interpolation() - Pine Script Function

Calculates percentile using method of linear interpolation between the two nearest ranks.

ta.percentile_linear_interpolation(source, length, percentage) → series float
NameTypeDescription
sourceseries int/floatSeries of values to process (source).

P-th percentile of source series for length bars back.

  • Note that a percentile calculated using this method will NOT always be a member of the input data set.