Skip to content
Algo Trade Analytics Docs

table.clear() - Pine Script Function

The function removes a cell or a sequence of cells from the table. The cells are removed in a rectangle shape where the start_column and start_row specify the top-left corner, and end_column and end_row specify the bottom-right corner.

table.clear(table_id, start_column, start_row, end_column, end_row) → void
NameTypeDescription
table_idseries tableA table object.
//@version=6
indicator("A donut", overlay=true)
if barstate.islast colNum = 8, rowNum = 8 padding = "◯" donutTable =
table.new(position.middle_right, colNum, rowNum)
for c = 0 to colNum - 1
for r = 0 to rowNum - 1
table.cell(donutTable, c, r, text=padding, bgcolor=#face6e, text_color=color.new(color.black, 100)) table.clear(donutTable, 2, 2, 5, 5)