table.new

Creates a table pinned to a corner or edge of the pane (position.*) and returns its handle. Fill it with table.cell(). Only cells that were set take space. Create it once (var t = table.new(...)) and fill it on the last bar (if barstate.islast).

table.new(position: string = "top_right", columns: int, rows: int, bgcolor: color = na, frame_color: color = na, frame_width: int = 0, border_color: color = na, border_width: int = 0, force_overlay: bool = false) -> table

Parameters

Example

var t = table.new(position.top_right, 2, 1)
if barstate.islast
    table.cell(t, 0, 0, "Close")
    table.cell(t, 1, 0, str.tostring(close))