使用 security() 时重新绘制
当我使用 security() 时,我的 pine 代码中存在一些问题,
我对图表和 security() 函数使用不同的时间范围,并且它在我的策略中发出虚假警报,
我阅读了此常见问题解答(链接),但我无法解决我的问题 有人可以帮忙吗?
res5 = input("45", type=input.resolution)
o = security(syminfo.tickerid, res5, open, barmerge.gaps_off, barmerge.lookahead_on)
c = security(syminfo.tickerid, res5, close, barmerge.gaps_off, barmerge.lookahead_on)
hz = security(syminfo.tickerid, res5, high, barmerge.gaps_off, barmerge.lookahead_on)
l = security(syminfo.tickerid, res5, low, barmerge.gaps_off, barmerge.lookahead_on)
i have some problem in my pine code when i use security()
i use diffrent timeframe for chart and security() function, and its make fake alert in my strategy
i read this FAQ (link) but i can't fix my problem
can anyone help ?
res5 = input("45", type=input.resolution)
o = security(syminfo.tickerid, res5, open, barmerge.gaps_off, barmerge.lookahead_on)
c = security(syminfo.tickerid, res5, close, barmerge.gaps_off, barmerge.lookahead_on)
hz = security(syminfo.tickerid, res5, high, barmerge.gaps_off, barmerge.lookahead_on)
l = security(syminfo.tickerid, res5, low, barmerge.gaps_off, barmerge.lookahead_on)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当柱线关闭时,您应该请求更高时间范围的数据。常见问题解答中明确说明了这一点。
使用它来进行安全调用:
You should request data from a higher time frame when the bar is closed. It is clearly stated in that FAQ.
Use this for your security calls: