Arrays / Reference
alerta.array.percentrank
TradingView-compatible spelling: array.percentrank, runs without warnings
Returns the percent rank (0..100) of the element at index: the share of the other elements at or below it.
alerta.array.percentrank(id, index) → floatParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
id | Array | Yes | — | Array handle. |
index | int | Yes | — | Index of the element to rank. |
Returns
floatExample
alerta.array.percentrank
arr = array.from(1, 2, 3, 4)plot(array.percentrank(arr, 3), { title: "array percentrank", pane: "oscillator" })Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.