Arrays / Reference
alerta.array.indexof
TradingView-compatible spelling: array.indexof, runs without warnings
Returns the index of a value in the array or -1 if not found (supports series value lookups).
alerta.array.indexof(id, value) → intParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
id | Array | Yes | — | Array handle. |
value | any | Yes | — | Value to search for. |
Returns
intExample
alerta.array.indexof
myArr = array.new_float(0)array.push(myArr, close)valueSeries = closeidx = array.indexof(myArr, valueSeries)Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.