简体   繁体   English

如何从 pine 脚本中引用其他指标?

[英]How to reference an other indicator from pine script?

I have bought premium indicators and oscillators.我已经购买了优质指标和振荡器。 I would like to write a pine script in TradingView that depends on the values, colors of these.我想在 TradingView 中编写一个取决于这些值和颜色的 pine 脚本。

How can we do that?我们怎么能做到这一点?

You can use source type input in any indicator您可以在任何指示器中使用源类型输入

src = input(close, title="Source")

Then in the settings panel you can feed any other indicator output to this.然后在设置面板中,您可以将任何其他指标输出提供给它。 And, you can use this src for any calculation.而且,您可以使用此 src 进行任何计算。

You will not be able to use colors from another indicator.您将无法使用其他指标的颜色。 Using input.source() operator, you can use only the values of the series, which are output as graphs (by plot*() operators).使用input.source()运算符,您只能使用以图形形式输出的系列值(通过plot*()运算符)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM