Skip to content
Algo Trade Analytics Docs

ta.percentrank() - Pine Script Function

Percent rank is the percents of how many previous values was less than or equal to the current value of given series.

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

Percent rank of source for length bars back.

  • na values in the source series are included in calculations and will produce an na result.