Holds every line still on the chart as an array, oldest first, rebuilt on each read.
Loop over it to restyle or delete lines in bulk, including lines whose variables went out of scope. The array never holds more lines than max_lines_count allows.
Taking an item out of the array does not remove the drawing; call line.delete() on it. A line deleted that way is missing from the next read.
Type
array<line>
Remarks
- On Sidechair: every use of
line.allbuilds a fresh array from the lines currently on the chart, in creation order, so the first item is the oldest line andarray.last()is the newest.
Example
//@version=6
indicator("line.all: newest line", overlay = true)
if bar_index % 15 == 0
line.new(bar_index, low, bar_index + 10, high, color = color.gray)
if barstate.islast
line.set_color(array.last(line.all), color.red)See also
Runs on Sidechair