Max_bars_back 错误仅出现在实时柱中
我制作了一个自动检测市场结构的脚本,它在历史柱上运行良好。 但是,当当前蜡烛(实时蜡烛)关闭并生成新蜡烛时,就会出现“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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的代码在计算期间使用内置的 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,).