我的指标即使不满足报警条件也会触发报警

My indicator triggers alarm even though it doesn't satisfy the alarm condition

My Indicator

我有一个可以发出信号的指标。工作逻辑是,如果背景为淡红色且价格触及蓝色条,则发出做空信号。如图所示,没有信号是因为

plot(long_short==-1 ? shortStop : na, style=plot.style_linebr, color=color.yellow, linewidth=3, title="Short Fixed SL")
plot(long_short==-1 ? shortTake : na, style=plot.style_linebr, color=color.blue, linewidth=3, title="Short Fixed TP")
...
alertcondition(condition=short_last, title="Short Alarm", message='Open a Short Trade @ ${{close}}')
...
if(short_last)
    l = label.new(bar_index, high)
    label.set_text(l, "sell@\n"+str.tostring(close))
    label.set_color(l, color.red)
    label.set_yloc(l, yloc.abovebar)
    label.set_style(l, label.style_arrowdown)

如果 short_last 为真,它应该有 tp/sl 行和左侧信号中的标签,但它不存在,因为 short_last 必须为假。换句话说,它实际上不应该发出信号。有什么问题,我该如何解决?

我找到了导致问题的原因。在 Tradingview 中添加警报时,它是根据指标的默认输入添加的。我稍后更改了输入,但由于警报仍根据默认值保留,它实际上显示为另一个输入的 light-red 区域,这就是它触发警报的原因。现在又要设置40个闹钟了