Reference
Alerts
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.
| Name / Signature | Description | Returns |
|---|---|---|
| alerta.alertalert(message, freq) | Triggers an alert event when executed. freq controls dispatch cadence: once_per_bar (default), once_per_bar_close (held until the bar closes), all (every tick). Message supports {{placeholders}}: ticker, exchange, interval, time, OHLCV, plot_N, plot("Title"), syminfo.*, strategy.order.id/action/contracts/price/comment/alert_message, strategy.market_position(_size), strategy.prev_market_position(_size). | void |
| alerta.alertconditionalertcondition(condition, title, message) | 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(). | void |
| alerta.alert.freq_once_per_baralert.freq_once_per_bar → const string | Alert delivery frequency while the script is running. Use alert.freq_once_per_bar as a value, without parentheses. | const string |
| alerta.alert.freq_once_per_bar_closealert.freq_once_per_bar_close → const string | Alert delivery frequency while the script is running. Use alert.freq_once_per_bar_close as a value, without parentheses. | const string |
| alerta.alert.freq_allalert.freq_all → const string | Alert delivery frequency while the script is running. Use alert.freq_all as a value, without parentheses. | const string |