Sidechair

linefill.get_line1()

Browse the reference

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

Try it in the editor

It is the line passed as line1 to linefill.new(). The handle is the real object, so any line.get_* call works on it without a separate variable.

Pair it with line.get_price() to read where one edge of the band sits on a given bar.

Syntax

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

Arguments

NameTypeDefaultDescription
idseries linefillrequiredThe linefill to read the first line from.

Returns

series line: The first line of the fill.

Example

Pine ScriptPlot the first edge's price on every barOpen in editor
//@version=6
indicator("linefill.get_line1: edge price", overlay = false)
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))
plot(na(f) ? na : line.get_price(linefill.get_line1(f), bar_index), "First edge")

See also

Runs on Sidechair