尝试将Pinescript函数从V4转换为V5
我正在尝试将V4中的简单功能转换为V5中的一个简单功能,但无处可转换。文档似乎相对模糊。有什么想法吗?
V4
bcwsma(s,l,m) =>
_s = s
_l = l
_m = m
_bcwsma = (_m*_s+(_l-_m)*nz(_bcwsma[1]))/_l
_bcwsma
V5
bcwsma(s,l,m) =>
_s = s
_l = l
_m = m
_bcwsma = (_m*_s+(_l-_m)*nz(_bcwsma[1]))/_l
_bcwsma
V5中的回录是臭名昭著的未确定标识符错误。
第14行:未宣布的标识符'_bcwsma'
I am trying to convert what seems like a simple function in V4 to V5 but getting nowhere. The docs seem relatively vague. Any ideas?
V4
bcwsma(s,l,m) =>
_s = s
_l = l
_m = m
_bcwsma = (_m*_s+(_l-_m)*nz(_bcwsma[1]))/_l
_bcwsma
V5
bcwsma(s,l,m) =>
_s = s
_l = l
_m = m
_bcwsma = (_m*_s+(_l-_m)*nz(_bcwsma[1]))/_l
_bcwsma
The readback in v5 is the infamous undeclared identifier error.
line 14: Undeclared identifier '_bcwsma'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试以下操作:
Try this: