在 pinescript 中调用自定义指标
我正在研究一个需要图表上和底部窗口指标中的机器人的指标。我无法在一个自定义指标脚本中使叠加正确和错误。因此,我想制作 2 个文件,其中一个包含覆盖为 true 的指标,另一个包含为 false 的指标。现在我想知道如何将一个指标脚本调用到另一个指标脚本中,以便两个脚本都使用一个指标脚本运行。
I am working on an indicator that require bot on chart and in the bottom window indicators. I am unable to make overlay true and false in one custom indicator script. So I want to make 2 files one contain indicators with overlay true and one with false. Now I want to know how can I call one indicator script into other so that both scripts run by using one indicator script.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
那是不可能的。
假设
脚本 A
是overlay=true
的脚本,脚本 B
是overlay=false
的脚本。复制从 B 到 A 的所有内容(除了图等)并将其用作一个指标。因此,您仍然可以更改 B 的设置并查看结果。
将 B 添加到您的图表中,以便您可以直观地看到 B 的情况。当您在主脚本 A 中更改与 B 相关的内容时,请记住同步其设置。
That is not possible.
Let's say
Script A
is the one withoverlay=true
andScript B
is withoverlay=false
.Copy everything from B to A (except the plots etc.) and use it as one indicator. So, you can still change the settings of B and see the results.
Add B to your chart also so you can visualize what's going with B. Remember to sync it's settings when you change something related to B in your main script A.