【发布时间】:2022-08-19 15:03:15
【问题描述】:
我想要代码在刚刚越过 hl 时在 ll 中发出警报,在刚刚越过 lh 时发出警报 hh 注意:我不需要警报 LH 或 HL HH(cross HH) 和 LL(cross LL)
标签: alert trading pinescript-v5 indicator
我想要代码在刚刚越过 hl 时在 ll 中发出警报,在刚刚越过 lh 时发出警报 hh 注意:我不需要警报 LH 或 HL HH(cross HH) 和 LL(cross LL)
标签: alert trading pinescript-v5 indicator
你可以做这样的事情。没有把握。试试这个方法。
alertcondition(long_final, title="buy alarm", message="buy signal!!!")
alertcondition(short_final, title="sell alarm", message="sell
signal!!!")
last_signal := long_final ? 1 : short_final ? -1 : last_signal[1]
plotshape(long_final, style=shape.labelup,
location=location.belowbar, color=green,size=size.tiny,title="buy
label",text="BUY",textcolor=white)
plotshape(short_final, style=shape.labeldown,
【讨论】: