bgcolor
Shades the pane’s background. Like barcolor it adds no value to the chart.
It differs from barcolor in one way that matters: it takes a force_overlay argument and barcolor does not.
bgcolor(series color color, const string title, input int offset, const bool force_overlay) → void| Parameter | Type | Required | Description |
|---|---|---|---|
color | series color | no | The colour applied to the background. Series-form. Optional. |
title | const string | no | The name of the colouring. Const-form. |
offset | input int | no | Shifts the colouring along the chart. Input-form. |
force_overlay | const bool | no | Sets this drawing’s overlay, separately from the script-wide setting. |
Returns void — void.
indicator("Shade the background")
plot(close)
bgcolor(color.new(color.blue, 0.1), title = "Background")See also bars and background
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.