【问题标题】:TradingView Alerrt Message Question - (alertcondition custom message question)TradingView Alerrt Message Question - (alertcondition 自定义消息问题)
【发布时间】:2020-07-16 16:03:11
【问题描述】:

我希望有人帮助我。我知道这可能很简单,但我想不通。

在枢轴脚本中,用户可以输入枢轴类型:

pivotType = input(title="Pivot Type", options=["Daily", "Intraday", "Weekly"], defval="Daily")

在警报消息中,我希望它在警报消失时说明枢轴类型命中。我希望消息说“每日枢轴级别命中”或“每周枢轴级别命中”。我在下面尝试了以下方法,但似乎没有用。:

alertcondition(condition=cross(close, r1), title="All Pivots Alert", message="A {{pivotType}} Pivot level hit")

我尝试了上面的格式,但它似乎不起作用。我需要什么代码才能将 pivotType 显示为消息的一部分?

非常感谢您的帮助!!

【问题讨论】:

    标签: pine-script


    【解决方案1】:

    目前无法在alertcondition() 消息文本中包含动态文本。详情请见Is it possible to use a string that varies as an argument to the alertcondition() function’s message= parameter?。

    您可以使用此技术绘制与您的每个条件相对应的不同数值:How can I include values that change in my alerts?

    【讨论】:

      猜你喜欢
      • 2020-08-21
      • 2011-03-16
      • 1970-01-01
      • 2021-09-12
      • 2021-09-07
      • 2021-08-12
      • 1970-01-01
      • 2012-12-18
      • 1970-01-01
      相关资源
      最近更新 更多