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) → intParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
id | Array | Yes | — | Sorted array handle. |
value | float | Yes | — | Numeric value to search. |
Returns
intExample
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.