Attaches hover text to one cell, so a short value can carry a longer explanation.
Keep the cell itself short and put the detail in the tooltip: the formula, the window length or the time the value was taken.
An empty string removes the tooltip. The text appears only while the pointer rests on that cell.
Syntax
table.cell_set_tooltip(table_id: series table, column: series int, row: series int, tooltip: series string (optional)) -> void
table.cell_set_tooltip(column: series int, row: series int, tooltip: series string (optional)) -> voidArguments
| Name | Type | Default | Description |
|---|---|---|---|
| table_id | series table | required | The table that holds the cell whose hover text changes. |
| column | series int | required | Column of the cell that gets the tooltip, counting from 0 at the left. |
| row | series int | required | Row of the cell that gets the tooltip, counting from 0 at the top. |
| tooltip | series string | "" | Hover text for the cell. An empty string removes any tooltip the cell had. |
Returns
Nothing.
Example
//@version=6
indicator("table.cell_set_tooltip: live note", overlay = true)
len = input.int(14, "ATR length", minval = 1)
var t = table.new(position.top_right, 1, 1)
if barstate.islast
table.cell(t, 0, 0, str.tostring(ta.atr(len), "#.##"))
table.cell_set_tooltip(t, 0, 0, str.format("Average true range over {0} bars", len))See also
Runs on Sidechair