如何仅用松木脚本标记或绘制上一个nth bar

发布于 2025-02-14 01:23:09 字数 234 浏览 1 评论 0原文

我尝试仅突出显示Pine脚本编辑器中的上一个第5个栏。

我发现Pine脚本总是从当前输出一系列条:

//@version=5
indicator("Previous Day Retrace", overlay = true)
l = label.new(bar_index, close)
label.delete(l[5])

我如何只在每次仅标记或仅绘制一个bar?寻找帮助

I try to highlight only the previous 5th bar within the Pine Script Editor.

I found the Pine Script always outputs a range of bars from the present like this:

//@version=5
indicator("Previous Day Retrace", overlay = true)
l = label.new(bar_index, close)
label.delete(l[5])

How can I just label or plot only one bar at each time? Looking for your help

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

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

发布评论

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

评论(1

失眠症患者 2025-02-21 01:23:09

您可以在bar_index-4上绘制标签,然后将标签删除至上一个标签IE b 1

//@version=5
indicator("Previous Day Retrace", overlay = true)
l = label.new(bar_index-4, high)
label.delete(l[1])

“在此处输入图像说明”

You can plot the label at bar_index-4 and then delete upto previous label i.e. b1

//@version=5
indicator("Previous Day Retrace", overlay = true)
l = label.new(bar_index-4, high)
label.delete(l[1])

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文