简体   繁体   English

交易视图:如何在我的自定义 pine-script 研究中使用仅限邀请指标的字段?

[英]Trading View: how to use the fields from invite-only indicator, inside of my custom pine-script study?

I am using an " invite-only " script, as a custom indicator.我正在使用“仅限邀请”脚本作为自定义指标。 When the script is applied on the chart and I manually try to add an alert over this script, I can see there are some related fields which I can manage on the alert dialog.当脚本应用于图表并且我手动尝试在此脚本上添加警报时,我可以看到有一些相关字段可以在警报对话框中管理。 What I want to accomplish is to write a pine-script study where I will be able to call alertcondition(condition, title, message) and inside of the condition to use the custom fields which are indicator specific only.我想要完成的是编写一个pine-script研究,我将能够调用alertcondition(condition, title, message)并在条件内部使用仅特定于指标的自定义字段。 Considering that I don't have access to the code of the indicator, I can not alter the code from the " invite-only " script.考虑到我无法访问指标的代码,我无法更改“仅邀请”脚本中的代码。

Is there any way which I can use the indicator related fields for creating the alert condition inside of my pine-script study?有什么方法可以使用指标相关字段在我的pine-script研究中创建警报条件? Any link / reference will be helpful, as I was not able to find any so far.任何链接/参考都会有所帮助,因为到目前为止我找不到任何链接/参考。

You can use another indicator as an input source.您可以使用另一个指示器作为输入源。

data = input(title="Data", type=input.source, defval=close)

In the Data input dropdown, you should see the names of the plots of the invite-only indicator.Data输入下拉列表中,您应该会看到仅限邀请指标的图的名称。
From there on, you can use that value in an alert.从那里开始,您可以在警报中使用该值。
For details, see How to code an input option for TradingView's 'apply indicator on indicator' feature?有关详细信息,请参阅如何为 TradingView 的“在指标上应用指标”功能编写输入选项?

This might be worth looking into.这可能值得研究。 With luck the invite-only indicator produces output that can be used as an external source for this script:幸运的是,仅受邀指标会生成 output 可用作此脚本的外部源:

https://www.tradingview.com/script/dYqL95JB-Backtesting-Trading-Engine-PineCoders/ https://www.tradingview.com/script/dYqL95JB-Backtesting-Trading-Engine-PineCoders/

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

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