如何从不同时间段绘制EMA? pinescript

发布于 2025-02-13 05:42:18 字数 307 浏览 1 评论 0原文

我不确定为什么此代码不起作用并绘制5分钟图HMA HMA 49。 第13行:输入'5'的语法错误。 我很难过吗?

任何帮助将不胜感激!

预先感谢

Paul

//获得价值观

hma49 = hma(close,49)
hma9 = hma(close,9)
ema9 = ema(close,9)
5minhma49 = security(syminfo.ticker,5, hma(close,49))
t = tickerid(syminfo.prefix, syminfo.ticker)

I am unsure as to why this code does not work to reference and plot a 5min chart HMA 49. keep getting
line 13: Syntax error at input '5'.
I am stumped?

any help would be greatly appreciated!

Thanks in advance,

Paul

//Get Values

hma49 = hma(close,49)
hma9 = hma(close,9)
ema9 = ema(close,9)
5minhma49 = security(syminfo.ticker,5, hma(close,49))
t = tickerid(syminfo.prefix, syminfo.ticker)

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

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

发布评论

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

评论(1

月牙弯弯 2025-02-20 05:42:18

您不能用数字启动变量名。
请参阅参考手册 dissinefiers

您可以更改<<<<<<<<<<<<<<<<<<<代码> 5minhma49 to min5hma49,以使其正确编译。

You cannot start a variable name with a digit.
See reference manual Identifiers

You could change 5minhma49 to min5hma49 for example, to make it compile properly.

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