Skip to main content

BollingerBandsConfig

type BollingerBandsConfig = {
enabled?: boolean;
fillOpacity?: number;
fillVisible?: boolean;
lowerColor?: string | number;
lowerWidth?: number;
maType?: MAKind;
middleColor?: string | number;
middleWidth?: number;
period?: number;
source?: MASource;
stdDev?: number;
upperColor?: string | number;
upperWidth?: number;
};

Source: types/src/index.ts:720

Bollinger Bands overlay config. A basis moving average of source over period, banded at ± stdDev × population standard deviation of the same window, drawn as three lines on the price pane with an optional translucent fill between the bands. No pane is reserved.

Properties​

enabled?​

optional enabled?: boolean;

Source: types/src/index.ts:722

Draw the bands. Default false.


fillOpacity?​

optional fillOpacity?: number;

Source: types/src/index.ts:750

Fill opacity 0..1, applied to the upper band color. Default 0.1.


fillVisible?​

optional fillVisible?: boolean;

Source: types/src/index.ts:748

Draw the translucent fill between the bands. Default true.


lowerColor?​

optional lowerColor?: string | number;

Source: types/src/index.ts:744

Lower band color. Default blue.


lowerWidth?​

optional lowerWidth?: number;

Source: types/src/index.ts:746

Lower band stroke width in px. Default 1.


maType?​

optional maType?: MAKind;

Source: types/src/index.ts:734

Averaging for the basis (middle) line (MAKind). Default 'sma'. The stdev always uses the window's arithmetic mean, even with an EMA basis (the standard semantics).


middleColor?​

optional middleColor?: string | number;

Source: types/src/index.ts:740

Basis (middle) line color. Default orange.


middleWidth?​

optional middleWidth?: number;

Source: types/src/index.ts:742

Basis line stroke width in px. Default 1.


period?​

optional period?: number;

Source: types/src/index.ts:724

Lookback in candles. Default 20, clamped to >= 1.


source?​

optional source?: MASource;

Source: types/src/index.ts:728

Price source (MASource). Default 'close'.


stdDev?​

optional stdDev?: number;

Source: types/src/index.ts:726

Standard-deviation multiplier. Default 2.


upperColor?​

optional upperColor?: string | number;

Source: types/src/index.ts:736

Upper band color (hex string or packed ARGB number). Default blue.


upperWidth?​

optional upperWidth?: number;

Source: types/src/index.ts:738

Upper band stroke width in px. Default 1.