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:563

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:565

Draw the bands. Default false.


fillOpacity?

optional fillOpacity?: number;

Source: types/src/index.ts:593

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


fillVisible?

optional fillVisible?: boolean;

Source: types/src/index.ts:591

Draw the translucent fill between the bands. Default true.


lowerColor?

optional lowerColor?: string | number;

Source: types/src/index.ts:587

Lower band color. Default blue.


lowerWidth?

optional lowerWidth?: number;

Source: types/src/index.ts:589

Lower band stroke width in px. Default 1.


maType?

optional maType?: MAKind;

Source: types/src/index.ts:577

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:583

Basis (middle) line color. Default orange.


middleWidth?

optional middleWidth?: number;

Source: types/src/index.ts:585

Basis line stroke width in px. Default 1.


period?

optional period?: number;

Source: types/src/index.ts:567

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


source?

optional source?: MASource;

Source: types/src/index.ts:571

Price source (MASource). Default 'close'.


stdDev?

optional stdDev?: number;

Source: types/src/index.ts:569

Standard-deviation multiplier. Default 2.


upperColor?

optional upperColor?: string | number;

Source: types/src/index.ts:579

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


upperWidth?

optional upperWidth?: number;

Source: types/src/index.ts:581

Upper band stroke width in px. Default 1.