我不能在 pine 脚本 V5 中使用 input.bool 命令

I can't use input.bool command in pine script V5

我无法在 pine 脚本 V5 中使用 input.bool 命令。如果输入为真,下面的命令是否有效,我该怎么做?

bak = input.bool(true, title="True or False")

len = input.int(defval=13, minval=1, title="Length", group='Ema', confirm=false)
src = input(close, title="Source", group='Ema')
offset = input.int(title="Offset", defval=0, minval=-500, maxval=500, group='Ema')
out = ta.ema(src, len)
plot(out, title="EMA 13", color=color.blue, offset=offset, linewidth=2)

您可以将条件应用于 plot() 的 [=11th=] 参数。

plot(bak ? out : na, title="EMA 13", color=color.blue, offset=offset, linewidth=2)