fill, fill_area
Syntax Format
open = first
close = second
fill(first, second, name="Filled", color=color.blue)
Overview
The fill and fill_area functions color the area between two plotted lines. They're particularly handy for highlighting overbought and oversold levels, or potential trend reversals — the color can change at the point where the two lines intersect.
Parameters
| Parameter | Type | Purpose | Default State |
|---|---|---|---|
| First | series or numeric | First series | - |
| Second | series or numeric | Second series | - |
| Name | string | Name of the plot | "fill(first,second)" |
| Color | color | Color 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)
}