如何将标准偏差与比较操作员使用?
每当我尝试使用比较操作员使用标准偏差时,我都会得到此错误:
无法称呼“操作员”使用'expr1'=系列[bool]。论点 应该是类型:float
示例脚本
//@version=4
study("script")
length = 10
size = open-close
average_size = sma(size,length)
dev = stdev(size,length)
cond = size > average_size + dev
bgcolor(cond?color.blue:na)
我该怎么做?
Whenever I try to use standard deviation with a comparison operator, I get this error:
Cannot call 'operator >' with 'expr1'=series[bool]. The argument
should be of type: float
Example script
//@version=4
study("script")
length = 10
size = open-close
average_size = sma(size,length)
dev = stdev(size,length)
cond = size > average_size + dev
bgcolor(cond?color.blue:na)
How would I go about doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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