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
positionstring: position.*columnsint: Number of columns, 1 or more (a fraction is cut off); columns * rows may be at most 10,000.rowsint: Number of rows, 1 or more (a fraction is cut off); columns * rows may be at most 10,000.bgcolorcolor: Background of the whole table (default none).frame_colorcolor: Color of the outer frame (default none).frame_widthint: Width of the outer frame. Width in pixels, rounded to a whole number (na = 1, below 0 = 0).border_colorcolor: Color of the lines between cells (default none).border_widthint: Width of the lines between cells. Width in pixels, rounded to a whole number (na = 1, below 0 = 0).force_overlaybool: Accepted for scripts from Pine and ignored: drawings stay in the script pane.
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))