Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.array.percentrank
On this pageSignatureParametersReturnsExample

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) → float

Parameters

NameTypeRequiredDefaultDescription
idArrayYes—Array handle.
indexintYes—Index of the element to rank.

Returns

float

Example

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.

AlertaScript

No results found.

Search by name, alias, or keyword.