pine脚本-对打印样式或线宽使用布尔值会导致错误。如何以正确的方式进行?
发布时间:2022-05-30 21:39:18 277
相关标签:
在这个简化的示例中,我们修改style
打印函数的。
plot(Something, "SomethingWePlot", color=colorful, linewidth = 1, style = BooleanVariable ? plot.style_line : plot.style_cross)
我们可以对其颜色执行此操作,但如果我希望线条样式使用相同的颜色,则会显示以下错误消息:Cannot call 'operator ?:' with argument 'expr0'='BooleanVariable'. An argument of 'series bool' type was used but a 'input bool' is expected
当我想改变linewidth
布尔变量的值:
plot(Something, "SomethingWePlot", color=colorful, linewidth = BooleanVariable ? 3 : 1, style = plot.style_cross)
Cannot call 'plot' with argument 'linewidth'='call 'operator ?:' (series int)'. An argument of 'series int' type was used but a 'input int' is expected
如何以正确的方式进行?有一个旧的解决方法在这里但据我所知,这消耗了64个(限制)中的2个绘图,多亏了一堆绘图字符和标签,我已经接近了限制。
特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报