Alerts / Reference
alerta.alertcondition
TradingView-compatible spelling: alertcondition, runs without warnings
Registers a named, selectable alert condition (listed by title in the alert UI) and fires it when the condition is true on the current bar. Message supports the same {{placeholder}} set as alert().
alerta.alertcondition(condition, title, message) → voidParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
condition | series bool | Yes | — | Condition that enables alert. |
title | string | No | — | Display title for alert. |
message | string | No | — | Alert message text. |
Returns
voidExample
alerta.alertcondition
indicator("Bearish price crossover", overlay=true)ma = ta.sma(close, 20)signal = ta.crossunder(close, ma)plot(ma, "SMA 20")plotshape(signal, title="Price crossed below SMA", style=shape.triangledown, location=location.abovebar)alertcondition(signal, "Bearish", "Price crossed below SMA 20")Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.