Skip to main content

fill, fill_area

Syntax Format

open = first
close = second

fill(first, second, name="Filled", color=color.blue)

Overview

The fill and fill_area functions are used to color the area between two lines, representing the series you indicate in the script. Usually, these functions are useful when indicating overbought and oversold levels, as well as potential price direction reversals, where the color changes at the intersection point.

Parameters

ParameterTypePurposeDefault State
Firstseries or numericFirst series-
Secondseries or numericSecond series-
NamestringName of the plot"fill(first,second)"
ColorcolorColor of the plot"white"

Example

overbought = input(80, "Overbought")
oversold = input(20, "Oversold")

fill_area {
first = overbought,
second = oversold,
color = rgba(255,255,255,0.2)
}