如何在 prine 脚本中编写此警报条件

发布于 2025-01-16 03:51:06 字数 546 浏览 1 评论 0原文

我有两个单独的指标, EMA1 是 ema,EMA2 是 wma。

我希望两个指标具有相同的警报条件 例如alertcondition(EMA1 = open or high or low or close or EMA2 = open or high or low or close)

此警报将突出显示使用 Ema 或 Wma 作为支撑或阻力的蜡烛。如果 Ema 价格或 Wma 价格等于这 4 个变量中的任何一个,我希望收到警报。

这就是我在 pine 脚本中编写代码的语法 Alertcondition(EMA1 = 开盘或最高或最低或收盘,title= "LowRiskEntryEma",message= "检测到 LowRiskEntryEma 信号" 或 EMA2 = 开盘或最高或最低或收盘,title= "LowRiskEntryWma",message= "检测到 LowRiskEntryWma 信号")

我不断收到此错误可能是因为我的语法错误 第 22 行:输入 '=' 不匹配,需要 ')'。

有没有更简单的方法来语法此警报条件

我不是程序员,因此任何帮助将不胜感激。

I have two separate indicators,
EMA1 is a ema and EMA2 is a wma.

I would like the same alert condition for both indicators
for example alertcondition(EMA1 = open or high or low or close or EMA2 = open or high or low or close)

This alert will highlight the candles that use the Ema or the Wma as support or resistance. I want a alert if the Ema price or the Wma price is equal to anyone of theses 4 variables.

This is how I syntax the code in pine script
alertcondition(EMA1 = open or high or low or close, title= "LowRiskEntryEma", message= "LowRiskEntryEma signal detecded" or EMA2 = open or high or low or close, title= "LowRiskEntryWma", message= "LowRiskEntryWma signal detecded")

I keep getting this error probably because my syntax is wrong
line 22: Mismatched input '=' expecting ')'.

Is there a simpler way to syntax this alert condition

Im not a progammer so any help would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故事↓在人 2025-01-23 03:51:06

您不需要编写警报代码,它已经存在于 tradeview 中。您只需在警报消息框中输入条件即可。你不知道就去阅读交易视图中的警报手册。我认为你的一切都不会得到解决。只需阅读报警手册
仔细地。如果您找不到它,请找到“帮助中心”>“警报”>“阅读有关消息。

You don't need to code an alarm it is already present in tradingview . You simply have to to wre the condition in message box of alarm . You not know about ot just go and read manual of alert in tradingview . I my opinion your all don't will be resolved. Just read alarm manual
carefully . If you not able to find it got to find help center >alarm > read about message.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文