【问题标题】:Custom alert in indicator指标中的自定义警报
【发布时间】:2022-08-19 15:03:15
【问题描述】:

我想要代码在刚刚越过 hl 时在 ll 中发出警报,在刚刚越过 lh 时发出警报 hh 注意:我不需要警报 LH 或 HL HH(cross HH) 和 LL(cross LL)

    标签: alert trading pinescript-v5 indicator


    【解决方案1】:

    你可以做这样的事情。没有把握。试试这个方法。

        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,
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-12-21
      • 2018-04-04
      • 1970-01-01
      • 1970-01-01
      • 2020-05-26
      • 1970-01-01
      • 2017-07-05
      相关资源
      最近更新 更多