Sidechair

linefill.get_line2()

Browse the reference

Returns the line that forms the second edge of a fill.

Try it in the editor

It is the line given as line2 to linefill.new(). Edit it to change the other side of the band, for instance to tilt the lower edge of a channel.

The returned object is the real line, so a change to it shows in the fill at once.

Syntax

Pine Script
linefill.get_line2(id: series linefill) -> series line
linefill.get_line2() -> series line

Arguments

NameTypeDefaultDescription
idseries linefillrequiredThe linefill to read the second line from.

Returns

series line: The second line of the fill.

Example

Pine ScriptPull the lower edge to the close and reshape the bandOpen in editor
//@version=6
indicator("linefill.get_line2: move second edge", overlay = true)
var linefill f = na
if barstate.islast
    f := linefill.new(line.new(bar_index - 20, high, bar_index, high), line.new(bar_index - 20, low, bar_index, low), color.new(color.gray, 85))
    line.set_xy2(linefill.get_line2(f), bar_index, close)

See also

Runs on Sidechair