label.all - Pine Script Variable
label.all
Section titled “label.all”Overview
Section titled “Overview”Returns an array filled with all the current labels drawn by the script.
array<label>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("label.all")//delete all labelslabel.new(bar_index, close)a_allLabels = label.allif array.size(a_allLabels) > 0for i = 0 toarray.size(a_allLabels) - 1 label.delete(array.get(a_allLabels, i))