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

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) → void

Parameters

NameTypeRequiredDefaultDescription
conditionseries boolYes—Condition that enables alert.
titlestringNo—Display title for alert.
messagestringNo—Alert message text.

Returns

void

Example

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.

AlertaScript

No results found.

Search by name, alias, or keyword.