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

Arrays / Reference

alerta.array.lastindexof

TradingView-compatible spelling: array.lastindexof, runs without warnings

Returns the last index of a value in the array or -1 if not found.

alerta.array.lastindexof(id, value) → int

Parameters

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

Returns

int

Example

alerta.array.lastindexof
myArr = array.new_float(0)array.push(myArr, 1)array.push(myArr, 2)array.push(myArr, 1)idx = array.lastindexof(myArr, 1)

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.