Skip to content
Algo Trade Analytics Docs

array.new_table() - Pine Script Function

The function creates a new array object of table type elements.

array.new_table(size, initial_value) → array<table>
NameTypeDescription
sizeseries intInitial size of an array. Optional. The default is 0.

The ID of an array object which may be used in other array.*() functions.

  • An array index starts from 0.
//@version=6
indicator("table array")
tables = array.new_table()array.push(tables,
table.new(position = position.top_left, rows = 1, columns = 2, bgcolor = color.yellow, border_width=1))
plot(1)