如果布尔值为真,如何绘制某些内容? PINE脚本V5

发布于 2025-01-25 10:43:49 字数 413 浏览 2 评论 0原文

这是我简化的代码:

PlotOrNot = input.bool(true, title="Plot it", inline = "01")
plot(SomethingCalculated, "Calculated Thing", color=color.blue, offset = offset)

当我发现这里,有一种方法可以告诉绘图命令执行绘图,以防布尔值为真,但我无法设法使其无法转变为错误消息。

Here's my simplified code:

PlotOrNot = input.bool(true, title="Plot it", inline = "01")
plot(SomethingCalculated, "Calculated Thing", color=color.blue, offset = offset)

As I found here, there's a way to tell the plot command to do the plot in case the Boolean value is true but I could not manage to make it not turn into error messages.

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

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

发布评论

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

评论(1

温馨耳语 2025-02-01 10:43:49

系列 plot()的参数中使用它。

plot(PlotOrNot ? SomethingCalculated : na, "Calculated Thing", color=color.blue, offset = offset)

Use it in the series argument of the plot().

plot(PlotOrNot ? SomethingCalculated : na, "Calculated Thing", color=color.blue, offset = offset)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文