Trading view:在我的网站嵌入的图表上添加自定义指标

huangapple go评论38阅读模式
英文:

Trading view : Add a custom indicator to a chart embedded in my website

问题

我有一个嵌入TradingView图表到我的网站的代码,但一旦嵌入图表,自定义指标就没有添加进去。如何向TradingView嵌入的图表添加自定义指标?我尝试将一个元素添加到studies数组中,但不起作用。有什么建议吗?

<!-- TradingView Widget BEGIN -->
<html>
<body>
<div class="tradingview-widget-container">
  <div id="tradingview_8ba84"></div>
  <div class="tradingview-widget-copyright"><a href="https://in.tradingview.com/symbols/NASDAQ-AAPL/" rel="noopener" target="_blank"><span class="blue-text">AAPL股票图表</span></a> 由TradingView提供</div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "autosize": true,
  "symbol": "NASDAQ:AAPL",
  "interval": "D",
  "timezone": "Etc/UTC",
  "theme": "dark",
  "style": "1",
  "locale": "in",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": true,
  "allow_symbol_change": true,
  "studies&quot: [
    "boomhunter"
  ],
  "container_id": "tradingview_8ba84"
  }
  );
  </script>
</div>
</body>
</html>
<!-- TradingView Widget END -->
英文:

I have a code to embed the trading view chart to my website however the custom indicators are not getting added once the chart is embedded. What is the way to add a custom indicator to a trading view embedded chart? I tried adding an element to the studies array but its not working. Suggestions?

<!-- TradingView Widget BEGIN -->
<html>
<body>
<div class="tradingview-widget-container">
  <div id="tradingview_8ba84"></div>
  <div class="tradingview-widget-copyright"><a href="https://in.tradingview.com/symbols/NASDAQ-AAPL/" rel="noopener" target="_blank"><span class="blue-text">AAPL stock chart</span></a> by TradingView</div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "autosize": true,
  "symbol": "NASDAQ:AAPL",
  "interval": "D",
  "timezone": "Etc/UTC",
  "theme": "dark",
  "style": "1",
  "locale": "in",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": true,
  "allow_symbol_change": true,
  "studies": [
    "boomhunter"
  ],
  "container_id": "tradingview_8ba84"
}
  );
  </script>
</div>
</body>
</html>
<!-- TradingView Widget END -->

答案1

得分: 1

无法在嵌入的TradingView图表中添加自定义研究。

来自小部件页面常见问题部分:

我想将自定义松树脚本添加到小部件。

目前无法向小部件添加松树脚本。您可以发布一个带有您的脚本的想法并进行嵌入。

英文:

Adding custom studies to an embedded TradingView chart is not possible.

From the Frequently Asked Questions section of the widget page:

> ### I'd like to add a custom pine script to the widget.
> It is not possible to add pine scripts to widgets at this time. You can publish an idea with your script and embed it.

答案2

得分: 0

我相信你需要使用“studies”部分并将它们添加到其中。 此网站 在演示的嵌入代码部分显示了一个示例。

英文:

I believe you need to use the "studies" part and add them in there. This site shows an example in the Embed Code section of the demo

huangapple
  • 本文由 发表于 2023年2月6日 22:09:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/75362398.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定