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

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

Parameters

NameTypeRequiredDefaultDescription
idArrayYes—Array handle.
valueanyYes—Value to search for.

Returns

int

Example

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.

AlertaScript

No results found.

Search by name, alias, or keyword.