Core / Reference
alerta.ta.lowestbars
TradingView-compatible spelling: ta.lowestbars, runs without warnings
Returns the offset to the lowest value of source over the last length bars, as Pine does: 0 on the current bar, negative before it (-3 = three bars ago). With a single argument — lowestbars(length) — the source is low.
alerta.ta.lowestbars(source, length) → series intParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
source | series | Yes | — | Series of values to process. |
length | int | Yes | — | Number of bars (length). |
Returns
series intExample
alerta.ta.lowestbars
const ll_off = lowestbars(low, 20)Notes
- Returns offset, not absolute bar_index. For absolute index use lowestindex().
Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.