Pine Script 如何在输入中添加复选框而不是下拉列表?
新的到Pine脚本,想知道如何将输入从下拉列表更改为hide/Show的复选框?谢谢。
highlow = input("", type=input.resolution, title="High")
dailyopenhigh = security(syminfo.tickerid, highlow, high)
line1 = line.new(x1=bar_index-1, y1=dailyopenhigh, x2=bar_index, y2=dailyopenhigh, xloc=xloc.bar_index, style=line.style_solid,extend=extend.right, color=color.blue)
line.set_width(line1, 2)
line.delete(line1\[1\]) // remove the previous line when new bar appears
我尝试了几种方法,无法弄清楚。
new to pine script and wondering how to change the inputs from dropdown list to checkbox for hide/show? Thank you.
highlow = input("", type=input.resolution, title="High")
dailyopenhigh = security(syminfo.tickerid, highlow, high)
line1 = line.new(x1=bar_index-1, y1=dailyopenhigh, x2=bar_index, y2=dailyopenhigh, xloc=xloc.bar_index, style=line.style_solid,extend=extend.right, color=color.blue)
line.set_width(line1, 2)
line.delete(line1\[1\]) // remove the previous line when new bar appears
I have tried several approaches and couldn't figue it out.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要为复选框使用
input.bool
。You need to use
input.bool
for the checkboxes.如果将来有人偶然发现这一点:
如果您不希望让用户能够切换时间范围:
In case anyone stumbles across this in the future:
If you're not looking to give the user the ability to switch timeframes: