在 PineScript 中添加超链接到表

发布于 2025-01-17 06:10:48 字数 712 浏览 0 评论 0原文

我正在使用表格在 PineScript 中创建一个新指标。

我有以下代码(为了更好地理解而发布的部分代码):

s01 = input.symbol('AMARAJABAT',  group = 'Symbols', inline = 's01')
s02 = input.symbol('APOLLOTYRE',  group = 'Symbols', inline = 's02')


// Get only symbol
only_symbol(s) => 
    array.get(str.split(s, ":"), 1)

s_arr   = array.new_string(0)

array.push(s_arr, only_symbol(s01))

table.cell(tbl, 0, i + 1, array.get(s_arr, i), text_halign = text.align_left,   bgcolor = color.gray, text_color = color.white, text_size = size.small)

..这成功地从数组中获取了股票代码。

如何使其可点击,以便我可以点击表格单元格并在 Tradingview 中打开图表。我想以某种方式这样做:

https://www.tradingview.com/chart/?symbol=NSE: + array.get(s_arr, i)

I am creating a new indicator in PineScript with a Table.

I have the following piece of code (partial code posted for better understand):

s01 = input.symbol('AMARAJABAT',  group = 'Symbols', inline = 's01')
s02 = input.symbol('APOLLOTYRE',  group = 'Symbols', inline = 's02')


// Get only symbol
only_symbol(s) => 
    array.get(str.split(s, ":"), 1)

s_arr   = array.new_string(0)

array.push(s_arr, only_symbol(s01))

table.cell(tbl, 0, i + 1, array.get(s_arr, i), text_halign = text.align_left,   bgcolor = color.gray, text_color = color.white, text_size = size.small)

..this successfully fetches the ticker symbol from the array.

How do I make this clickable so that I can click on the Table cell and the chart opens in Tradingview. I somehow want to do this:

https://www.tradingview.com/chart/?symbol=NSE: + array.get(s_arr, i)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

梦魇绽荼蘼 2025-01-24 06:10:48

目前这不是一个功能

This is not currently a feature

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