linefill.new
Fills the space between two lines with a color and returns its handle (na when a line is na or deleted). The fill follows the lines when they move and goes away with either line.
linefill.new(line1: line, line2: line, color: color = na) -> linefill
Parameters
line1line: The first line (from line.new); na or a deleted line gives na.line2line: The second line.colorcolor: the fill color, usually see-through (color.new(c, 80)); na fills nothing
Example
var line hi = line.new(0, 0, 0, 0)
var line lo = line.new(0, 0, 0, 0)
if barstate.isfirst
linefill.new(hi, lo, color.new(color.teal, 85))
hi.set_xy1(bar_index - 20, high)
hi.set_xy2(bar_index, high)
lo.set_xy1(bar_index - 20, low)
lo.set_xy2(bar_index, low)