The color of the chart's background, which follows the theme and canvas setting.
It follows the chart's theme and background setting, so a script can pick colors that suit light and dark charts alike. It has the input qualifier: the value is fixed for a run, and the script runs again when the setting changes.
Paint something in the background color to mask what is under it. A marker filled with chart.bg_color on top of a line reads as a hole in that line.
Type
input color
Remarks
- On Sidechair: the color follows the dark chart theme.
Example
//@version=6
indicator("chart.bg_color: hollow dots", overlay = true)
ma = ta.sma(close, 20)
plot(ma, "SMA", color.blue, 2)
plotshape(ta.cross(close, ma) ? ma : na, "Cross", shape.circle, location.absolute, chart.bg_color, size = size.tiny)See also
Runs on Sidechair