Skip to content
Algo Trade Analytics Docs
Pine library page — review pending. This page is preserved for compatibility but is not part of the reviewed search index. Check the official Pine Script v6 reference before relying on its explanation, signature, or example.

table - Pine Script Type

Keyword used to explicitly declare the “table” type of a variable or a parameter. Table objects (or IDs) can be created with the table.new function.

  • Table objects are always of “series” form.
//@version=6indicator("table")// Empty `table1` table ID.var table table1 = na// `table` type is unnecessary because `table.new()` returns "table" type.var table2 = table.new(position.top_left, na, na)if barstate.islastconfirmedhistory    var table3 = table.new(position = position.top_right, columns = 1, rows = 1, bgcolor = color.yellow, border_width = 1)    table.cell(table_id = table3, column = 0, row = 0, text = "table3 text")