Interface IndicatorBackgroundSpec

One column of per-bar shading a study's background returns in its list form, optionally sent to another pane or plot. colors is what the plain form returns: one entry per bar, null where nothing is shaded.

interface IndicatorBackgroundSpec {
    colors: readonly (null | string)[];
    overlay?: boolean;
    plot?: string;
}

Hierarchy (View Summary)

Properties

Properties

colors: readonly (null | string)[]
overlay?: boolean

The price pane, in the instrument's own units, staying there when the study moves. A shape is measured on the scale that pane quotes prices on (its crosshair readout, which is the candles' own scale on whichever axis they sit) and holds no axis itself, so the price axis stays free to move. A marker is anchored to the instrument's candles, so belowBar sits under the low; it is drawn once the chart has a primary series. A shading column fills the price pane's full height and binds no axis. Naming a plot as well is rejected: a plot already decides its pane.

plot?: string

A declared plot key. A shape is drawn on that plot's pane and measured on its effective price scale; a marker is anchored to that plot's series, so aboveBar and belowBar read its values, and where it has none, the candle's whenever that plot is on the price pane and on the candles' scale, first plot or not. A shading column fills that plot's pane and is bound to its effective scale, which has no price to measure but keeps the layer on the axis the plot uses, so a reassignment never leaves a column held for nothing. Each follows the plot through a scale reassignment or a study move. An overlay plot takes it to the price pane.