Skip to main content

MACDConfig

type MACDConfig = {
enabled?: boolean;
fast?: number;
histogramDownColor?: string | number;
histogramDownFadingColor?: string | number;
histogramUpColor?: string | number;
histogramUpFadingColor?: string | number;
histogramVisible?: boolean;
lineColor?: string | number;
lineVisible?: boolean;
lineWidth?: number;
maType?: MAKind;
signal?: number;
signalColor?: string | number;
signalMaType?: MAKind;
signalVisible?: boolean;
signalWidth?: number;
slow?: number;
source?: MASource;
zeroLineColor?: string | number;
zeroLineVisible?: boolean;
};

Source: types/src/index.ts:1380

MACD indicator config. Rendered in its own pane below the candles: the gap between a fast and a slow moving average, a signal line smoothing that gap, and a histogram of the distance between the two.

Every style field is optional and falls back to the stock look, so an untouched config renders exactly as it always has.

Properties​

enabled?​

optional enabled?: boolean;

Source: types/src/index.ts:1382

Draw the pane. Default false.


fast?​

optional fast?: number;

Source: types/src/index.ts:1384

Fast moving-average length. Default 12.


histogramDownColor?​

optional histogramDownColor?: string | number;

Source: types/src/index.ts:1423

Bars below zero still growing away from it. Defaults to theme.accentBear.


histogramDownFadingColor?​

optional histogramDownFadingColor?: string | number;

Source: types/src/index.ts:1428

Bars below zero rising back toward it. Defaults to histogramDownColor at half opacity.


histogramUpColor?​

optional histogramUpColor?: string | number;

Source: types/src/index.ts:1416

Bars above zero that are still growing away from it. Defaults to theme.accentBull. Set all four histogram colors alike for a flat, single-color histogram.


histogramUpFadingColor?​

optional histogramUpFadingColor?: string | number;

Source: types/src/index.ts:1421

Bars above zero that are falling back toward it, i.e. momentum easing. Defaults to histogramUpColor at half opacity.


histogramVisible?​

optional histogramVisible?: boolean;

Source: types/src/index.ts:1410

Draw the histogram bars. Default true.


lineColor?​

optional lineColor?: string | number;

Source: types/src/index.ts:1397

MACD line color (hex string or packed ARGB number). Default blue.


lineVisible?​

optional lineVisible?: boolean;

Source: types/src/index.ts:1401

Draw the MACD line. Default true.


lineWidth?​

optional lineWidth?: number;

Source: types/src/index.ts:1399

MACD line stroke width in px. Default 1.5.


maType?​

optional maType?: MAKind;

Source: types/src/index.ts:1392

Averaging used for the fast and slow legs (MAKind). Default 'ema'.


signal?​

optional signal?: number;

Source: types/src/index.ts:1388

Signal-line length. Default 9.


signalColor?​

optional signalColor?: string | number;

Source: types/src/index.ts:1403

Signal line color. Default orange.


signalMaType?​

optional signalMaType?: MAKind;

Source: types/src/index.ts:1394

Averaging applied to the MACD series for the signal line. Default 'ema'.


signalVisible?​

optional signalVisible?: boolean;

Source: types/src/index.ts:1407

Draw the signal line. Default true.


signalWidth?​

optional signalWidth?: number;

Source: types/src/index.ts:1405

Signal line stroke width in px. Default 1.5.


slow?​

optional slow?: number;

Source: types/src/index.ts:1386

Slow moving-average length (forced > fast). Default 26.


source?​

optional source?: MASource;

Source: types/src/index.ts:1390

Price source for the fast/slow legs (MASource). Default 'close'.


zeroLineColor?​

optional zeroLineColor?: string | number;

Source: types/src/index.ts:1431

Zero-reference line color. Default gray.


zeroLineVisible?​

optional zeroLineVisible?: boolean;

Source: types/src/index.ts:1433

Draw the zero-reference line. Default true.