【问题标题】:How to do or code to change the alert message without to change it every time in the alert message box如何在警报消息框中更改警报消息而不是每次都更改它的代码或代码
【发布时间】:2021-03-09 04:51:55
【问题描述】:

enter image description here

我如何做或编码来永久更改消息框中的警报消息,而不必每次为我的策略创建警报时都更改它? 我希望警报消息告诉

  • 进入或退出订单
  • 长或短
  • 时间范围、符号
  • 出入口价格

【问题讨论】:

    标签: pine-script


    【解决方案1】:

    以下内容应该会有所帮助。

    https://www.tradingview.com/support/solutions/43000481368-strategy-alerts/

    if GoLong
        alertsyntax_golong='long slprice=' + tostring(stoploss_long) + ' tradeid=' + tostring(trade_id) + ' tp=' + tostring(TakeProfitLevel)
        alert(message=alertsyntax_golong, freq=alert.freq_once_per_bar_close)
    if GoShort
        alertsyntax_goshort='short slprice=' + tostring(stoploss_short) + ' tradeid=' + tostring(trade_id) + ' tp=' + tostring(TakeProfitLevel)
        alert(message=alertsyntax_goshort, freq=alert.freq_once_per_bar_close)
    if TakePartialProfitLong
        alertsyntax_closepartlong='closepart tradeid=' + tostring(trade_id) + ' part=0.5'
        alert(message=alertsyntax_closepartlong, freq=alert.freq_once_per_bar_close)
    if TakePartialProfitShort
        alertsyntax_closepartshort='closepart tradeid=' + tostring(trade_id) + ' part=0.5'
        alert(message=alertsyntax_closepartshort, freq=alert.freq_once_per_bar_close)
    

    https://uk.tradingview.com/script/BTSkg8IP-TradingView-Alerts-to-MT4-MT5-Forex-indices-commodities/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多