Takes a table off the chart and frees its screen position.
The whole grid disappears and its slot is free for another table. After the call the variable still points at the deleted table, so assign na to it if later code tests na(t).
Use it when a table should show only under some condition, such as while a trade is open.
Syntax
table.delete(table_id: series table) -> void
table.delete() -> voidArguments
| Name | Type | Default | Description |
|---|---|---|---|
| table_id | series table | required | The table to remove from the chart. |
Returns
Nothing.
Example
//@version=6
indicator("table.delete: conditional", overlay = true)
var table t = na
if barstate.islast and na(t)
t := table.new(position.top_right, 1, 1)
table.cell(t, 0, 0, "Live")
if not barstate.islast and not na(t)
table.delete(t)
t := naSee also
Runs on Sidechair