Functions
linefill.new()
Creates a fill between two lines. If a fill already exists for this ordered pair (line1, line2), the previous fill is deleted and replaced. (line2, line1) is a different pair.
Syntax
linefill.new(series line line1, series line line2, series color color) → series linefill
Arguments
line1 required series line First line object. The fill tracks this line's current points. line2 required series line Second line object. The fill tracks this line's current points. color series color Fill color. Optional. Default is na. Return Type
series linefill Example
//@lipi=2
indicator("linefill.new Example", overlay=true)
if barstate.islast {
l1 = line.new(bar_index[20], high[20], bar_index, high, color=color.green)
l2 = line.new(bar_index[20], low[20], bar_index, low, color=color.red)
f = linefill.new(l1, l2, color.new(color.blue, 0.7))
}