box.all - Pine Script Variable
box.all
Section titled “box.all”Overview
Section titled “Overview”Returns an array filled with all the current boxes drawn by the script.
array<box>Remarks
Section titled “Remarks”- The array is read-only. Index zero of the array is the ID of the oldest object on the chart.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("box.all")//delete all boxesbox.new(time, open, time + 60 * 60 * 24, close, xloc=xloc.bar_time, border_style=line.style_dashed)a_allBoxes = box.allif array.size(a_allBoxes) > 0for i = 0 toarray.size(a_allBoxes) - 1 box.delete(array.get(a_allBoxes, i))