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:1055
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:1057
Draw the pane. Default false.
fast?
optional fast?: number;
Source: types/src/index.ts:1059
Fast moving-average length. Default 12.
histogramDownColor?
optional histogramDownColor?: string | number;
Source: types/src/index.ts:1098
Bars below zero still growing away from it. Defaults to theme.accentBear.
histogramDownFadingColor?
optional histogramDownFadingColor?: string | number;
Source: types/src/index.ts:1103
Bars below zero rising back toward it. Defaults to histogramDownColor at
half opacity.
histogramUpColor?
optional histogramUpColor?: string | number;
Source: types/src/index.ts:1091
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:1096
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:1085
Draw the histogram bars. Default true.
lineColor?
optional lineColor?: string | number;
Source: types/src/index.ts:1072
MACD line color (hex string or packed ARGB number). Default blue.
lineVisible?
optional lineVisible?: boolean;
Source: types/src/index.ts:1076
Draw the MACD line. Default true.
lineWidth?
optional lineWidth?: number;
Source: types/src/index.ts:1074
MACD line stroke width in px. Default 1.5.
maType?
optional maType?: MAKind;
Source: types/src/index.ts:1067
Averaging used for the fast and slow legs (MAKind). Default 'ema'.
signal?
optional signal?: number;
Source: types/src/index.ts:1063
Signal-line length. Default 9.
signalColor?
optional signalColor?: string | number;
Source: types/src/index.ts:1078
Signal line color. Default orange.
signalMaType?
optional signalMaType?: MAKind;
Source: types/src/index.ts:1069
Averaging applied to the MACD series for the signal line. Default 'ema'.
signalVisible?
optional signalVisible?: boolean;
Source: types/src/index.ts:1082
Draw the signal line. Default true.
signalWidth?
optional signalWidth?: number;
Source: types/src/index.ts:1080
Signal line stroke width in px. Default 1.5.
slow?
optional slow?: number;
Source: types/src/index.ts:1061
Slow moving-average length (forced > fast). Default 26.
source?
optional source?: MASource;
Source: types/src/index.ts:1065
Price source for the fast/slow legs (MASource). Default 'close'.
zeroLineColor?
optional zeroLineColor?: string | number;
Source: types/src/index.ts:1106
Zero-reference line color. Default gray.
zeroLineVisible?
optional zeroLineVisible?: boolean;
Source: types/src/index.ts:1108
Draw the zero-reference line. Default true.