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