Max_bars_back 错误仅出现在实时柱中

发布于 2025-01-16 07:54:57 字数 185 浏览 1 评论 0原文

我制作了一个自动检测市场结构的脚本,它在历史柱上运行良好。 但是,当当前蜡烛(实时蜡烛)关闭并生成新蜡烛时,就会出现“max_bars_back”指标错误。

我已经尝试在每个自定义函数中使用 max_bars_back() 函数,将其应用于每个输出变量,但这也不起作用。

我的代码仅使用 line.new() 在图表上绘制几条线

I have made a scipt that auto-detects market structures, it works fine on hystoric bars.
But when the current candle (real time candle) closes and a new candle is generated, then the "max_bars_back" indicator error occures.

I have already tried to use the max_bars_back() function in every custom function I have coded by applying it on every output variable but this doesn't work either.

My code only plots several lines onto the chart using line.new()

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

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

发布评论

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

评论(1

可爱咩 2025-01-23 07:54:57

如果您的代码在计算期间使用内置的 bar_index,请记住您需要使用 max_bars_back(time,) 指定缓冲区大小。

If your code is using the bar_index in-built during calculations, remember that you need to specify the buffer size using max_bars_back(time,).

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