在 pinescript 中调用自定义指标

发布于 2025-01-13 13:11:51 字数 153 浏览 1 评论 0原文

我正在研究一个需要图表上和底部窗口指标中的机器人的指标。我无法在一个自定义指标脚本中使叠加正确和错误。因此,我想制作 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 技术交流群。

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

发布评论

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

评论(1

万劫不复 2025-01-20 13:11:51

那是不可能的。

假设脚本 Aoverlay=true 的脚本,脚本 Boverlay=false 的脚本。

复制从 B 到 A 的所有内容(除了图等)并将其用作一个指标。因此,您仍然可以更改 B 的设置并查看结果。

将 B 添加到您的图表中,以便您可以直观地看到 B 的情况。当您在主脚本 A 中更改与 B 相关的内容时,请记住同步其设置。

That is not possible.

Let's say Script A is the one with overlay=true and Script B is with overlay=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.

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