TradingView Alert Message Question - (alertcondition自定义消息问题) [英] TradingView Alerrt Message Question - (alertcondition custom message question)

查看:146
本文介绍了TradingView Alert Message Question - (alertcondition自定义消息问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望有人帮助我.我知道这可能很简单,但我无法弄清楚.

在一个pivots脚本中,用户可以输入pivot类型:

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 显示为消息的一部分?

非常感谢您的帮助!!

解决方案

目前无法在 alertcondition() 消息文本中包含动态文本.见 是否可以使用变化的字符串作为 alertcondition() 函数的 message= 参数的参数? 了解更多详情.

您可以使用此技术绘制对应于您的每个条件的不同数值:如何在警报中包含更改的值?

I am hoping someone help me.I know this is probably really simple, but I couldn't figure it out.

In a pivots script , it has the user can input the pivot type:

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

In the alert message, I want it to state the pivot type hit when the alert goes off. I want the message to say "Daily Pivot level hit", or "Weekly Pivot level hit". I tried the following below, but it didn't appear to work.:

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

I tried the format above, but it didn't appear to work. What do I need code in to have the pivotType be displayed as part of the message?

Thank you very much for your help!!

解决方案

It's not currently possible to include dynamic text in alertcondition() message text. See Is it possible to use a string that varies as an argument to the alertcondition() function’s message= parameter? for more details.

You could use this technique to plot a varying numeric value corresponding to each of your conditions: How can I include values that change in my alerts?

这篇关于TradingView Alert Message Question - (alertcondition自定义消息问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆