The expression deactivates alerts. This is necessary if a script contains multiple alert statements and they need to be turned off under certain conditions.
- Alerts are only generated for the last bar.
The example shows how all alerts can be turned off depending on time. The alerts will not be displayed after 10:00 pm.
If Close > Close Then Alert("Price is going up"); If Volume > Volume Then Alert("Volume is increasing"); If Volatility(5) > Volatility(5) Then Alert("Volatility is rising"); If OpenInt > OpenInt Then Alert("Open interest is growing"); If Time >= 2200 Then Cancel Alert;