array.percentrank() - Pine Script Function
array.percentrank()
Section titled “array.percentrank()”Overview
Section titled “Overview”Returns the percentile rank of the element at the specified index.
Syntax
Section titled “Syntax”array.percentrank(id, index) → series floatParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| id | array<int/float> | An array object. |
Remarks
Section titled “Remarks”- Percentile rank is the number of elements in the array that are less than or equal to the reference value, expressed as a percentage.