我想添加文本并将其始终保留在图表的右上角。
这将是一种 4 行清单。
该文本被分配给一个指示器。
我怎样才能做到这一点?
预先感谢您的帮助。
这里是左侧山口的问题。
谢谢
小智 5
您可以使用 table.new 函数。
https://www.tradingview.com/pine-script-reference/v5/#fun_table{dot}new
//@version=5
indicator("table.new example")
var testTable = table.new(position = position.top_right, columns = 2, rows = 1, bgcolor = color.yellow, border_width = 1)
if barstate.islast
table.cell(table_id = testTable, column = 0, row = 0, text = "Open is " + str.tostring(open))
table.cell(table_id = testTable, column = 1, row = 0, text = "Close is " + str.tostring(close), bgcolor=color.teal)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3172 次 |
| 最近记录: |