Skip to content
Algo Trade Analytics Docs

label.all - Pine Script Variable

Returns an array filled with all the current labels drawn by the script.

array<label>
  • The array is read-only. Index zero of the array is the ID of the oldest object on the chart.
//@version=6
indicator("label.all")//delete all labels
label.new(bar_index, close)a_allLabels = label.all
if array.size(a_allLabels) > 0
for i = 0 to
array.size(a_allLabels) - 1 label.delete(array.get(a_allLabels, i))