Lipi Reference
Lipi

Functions

table.clear()

Removes cells in the inclusive rectangle. If end_column/end_row are omitted, only the start cell is cleared. Clearing a merge origin drops that merge.

Syntax

                table.clear(series table id, series int start_column, series int start_row, series int end_column, series int end_row) → void
              

Arguments

id required series table Table object.
start_column required series int Column of one corner (0-based).
start_row required series int Row of one corner (0-based).
end_column required series int Opposite column. Optional; defaults to start_column.
end_row required series int Opposite row. Optional; defaults to start_row.

Return Type

void

Example


          //@lipi=2
indicator("table.clear Example")
if barstate.islast {
    t = table.new(position.top_right, 2, 2)
    table.cell(t, 0, 0, text="A")
    table.cell(t, 1, 0, text="B")
    table.clear(t, 0, 0, 1, 0)
}