ta.percentile_nearest_rank() - Pine Script Function
ta.percentile_nearest_rank()
Section titled “ta.percentile_nearest_rank()”Overview
Section titled “Overview”Calculates percentile using method of Nearest Rank.
Syntax
Section titled “Syntax”ta.percentile_nearest_rank(source, length, percentage) → series floatParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| source | series int/float | Series of values to process (source). |
Returns
Section titled “Returns”P-th percentile of source series for length bars back.
Remarks
Section titled “Remarks”- Using the Nearest Rank method on lengths less than 100 bars back can result in the same number being used for more than one percentile.