Lipi Reference
Lipi

Functions

linefill()

Converts `value` to the `linefill` type. It is used almost only as `linefill(na)`, to declare a linefill variable that has no drawing yet, so that its type is known before the first drawing is assigned.

Syntax

                linefill(series linefill value) → series linefill
              

Arguments

value required series linefill

Return Type

series linefill

Example


          //@lipi=2
indicator("linefill() Example", overlay=true)
static linefill band = linefill(na)
if barstate.islast {
    upper = line.new(bar_index[20], high[20], bar_index, high, color=color.green)
    lower = line.new(bar_index[20], low[20], bar_index, low, color=color.red)
    band := linefill.new(upper, lower, color.new(color.gray, 0.2))
}