talib.percentrank

Ranks where source now stands against the last length bars of itself. It answers the question the other way round from the percentile functions: they take a rank and give a value, this takes the value and gives its rank.

talib.percentrank(series float source, series int length) → series float
ParameterTypeRequiredDescription
sourceseries floatyesThe series being ranked.
lengthseries intyesHow many bars the ranking covers.

Returns series float — A series float rank.

indicator("Percent rank of the close")
plot(talib.percentrank(close, 20))

See also talib.alma · talib.atr · talib.barssince

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade