The table type: a fixed grid of text cells anchored to a screen position on the chart, made by table.new().
A table variable points at one grid. Unlike a label or a box it has no bar or price coordinates: it sits in one of nine screen slots, such as top right or bottom left, and stays put as the chart scrolls and zooms.
Build it once with var, give each cell its content with table.cell(), and refresh the text under barstate.islast. Columns and rows count from 0 at the top left, and the grid size is fixed when the table is created.
Remarks
- Each of the nine positions shows one table at a time.
Example
//@version=6
indicator("table type: readout", overlay = true)
var table t = table.new(position.top_right, 2, 1, bgcolor = color.new(color.gray, 70))
if barstate.islast
table.cell(t, 0, 0, "Close")
table.cell(t, 1, 0, str.tostring(close, "#.##"))See also
Runs on Sidechair