Alerts reference
The 2 functions and 0 values of alert: signature, effects, phase, cost and tested examples.
Raise an alert at once, or declare a condition the settings panel lists. Alerts are limited per bar and per run. In this release alerts on your own scripts are switched off: a script with these calls compiles and runs, but no alert reaches you.
Functions#
alert.send#
alert.send([message], [key], [once], [cooldown])
Raises an alert with message on the current bar. once and cooldown limit how often the same alert may fire.
- Effects: can raise an alert; builds a new value whose size follows its arguments (counted in the memory ledger).
- Phase: every bar.
- Cost: allocates: the memory ledger counts what it builds; counts against the alerts allowed per bar and per run.
alert.when#
alert.when([condition], [name], [message], [on], [key], [was])
Declares an alert condition: the alert fires on the bars where condition is true, and appears in the settings under its name.
- Effects: can raise an alert.
- Phase: every bar.
- Cost: counts against the alerts allowed per bar and per run.
- Examples: Cross alert.