Drawing / Reference
alerta.fill
TradingView-compatible spelling: fill, runs without warnings
Fills the area between two plots (or two hlines). Each plot may be given by the handle plot() returns (p1 = plot(…)), by a plot() call written inline — fill(plot(a), plot(b), color = …) — or by its title. Pine v6's gradient form — fill(p1, p2, top_value, bottom_value, top_color, bottom_color) — works positionally and by name.
alerta.fill(plot1_id, plot2_id, y1?, y2?, color1?, color2?, { color, title, fillgaps, top_color, bottom_color }?) → voidParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
plot1 | plot | string | Yes | — | First plot: a plot handle, an inline plot() call or the plot's title. |
plot2 | plot | string | Yes | — | Second plot: a plot handle, an inline plot() call or the plot's title. |
y1 | series float | Not specified | — | Optional top series for advanced fills. |
y2 | series float | Not specified | — | Optional bottom series for advanced fills. |
color1 | string | Not specified | — | Primary fill color. |
color2 | string | Not specified | — | Secondary fill color. |
options | object | Not specified | — | Optional settings, accepted as named arguments too: color, title, fillgaps, display, editable, and Pine v6's gradient form top_value / bottom_value / top_color / bottom_color. |
Returns
voidExample
alerta.fill
basis = sma(close, 20)deviation = stdev(close, 20)upper = basis + deviationlower = basis - deviationplot(upper, { title: "up" })plot(lower, { title: "down" })fill("up", "down", { color: "rgba(0,0,255,0.1)" })Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.