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

Arrays / Reference

alerta.array.binary_search_rightmost

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

Returns the last matching index in a sorted numeric array, or the index immediately right of the insertion point.

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

Parameters

NameTypeRequiredDefaultDescription
idArrayYes—Sorted array handle.
valuefloatYes—Numeric value to search.

Returns

int

Example

alerta.array.binary_search_rightmost
arr = array.from(-2, 0, 1, 5, 9)idx = array.binary_search_rightmost(arr, 3)plot(idx, { title: "rightmost", 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.