Cancel Alert

取消警报。用于脚本中警报过多时在某些条件下关闭一些警报。

用法

Cancel Alert

注意

Alerts只在最后一根Bar产生。

范例

下例说明了如何根据时间关闭所有警报。在10:00pm之后,警报不会显示:

If Close > Close[1] Then
Alert("Price is going up");
If Volume > Volume[1] Then
Alert("Volume is increasing");
If Volatility(5) > Volatility(5)[1] Then
Alert("Volatility is rising");
If OpenInt > OpenInt[1] Then
Alert("Open interest is growing");
If Time >= 2200 Then Cancel Alert;