Moving Average Convergence Divergence — the difference of two EMAs with a signal line.
MACD (Moving Average Convergence/Divergence) consists of the MACD line (the difference between the fast and slow EMA), the signal line (an EMA of the MACD) and the histogram (the difference between the MACD and the signal). A crossover of the MACD with the signal line is a trading signal; a zero crossing confirms a trend change. Divergence between the MACD and price indicates a weakening trend.
MACD = EMA(Close, fast) - EMA(Close, slow)
Signal = EMA(MACD, signal)
Histogram = MACD - Signal
Parameter Type Default Range / Values Fast Lengthint 12 1-100 Signal Lengthint 9 1-50 Slow Lengthint 26 1-200
Trigger Direction Condition Description Signal line cross up 🟢 Buy The main line crossed the signal line from below to above — a buy signal. The MACD line crosses the signal line from below to above — a bullish crossover. Signal line cross down 🔴 Sell The main line crossed the signal line from above to below — a sell signal. The MACD line crosses the signal line from above to below — a bearish crossover. Zero cross up 🟢 Buy The indicator line crossed zero from below to above — a buy signal. The MACD line crosses the zero level from below to above. Zero cross down 🔴 Sell The indicator line crossed zero from above to below — a sell signal. The MACD line crosses the zero level from above to below. Histogram crosses zero up 🟢 Buy The histogram crossed zero from below to above — a buy signal. The histogram (MACD) crosses the zero level from below to above — a bullish signal. Histogram crosses zero down 🔴 Sell The histogram crossed zero from above to below — a sell signal. The histogram (MACD) crosses the zero level from above to below — a bearish signal. Slope turns positive 🟢 Buy The indicator’s slope turned positive — an upward reversal. The MACD line changes its slope from falling to rising — the indicator stopped falling and started rising. Slope turns negative 🔴 Sell The indicator’s slope turned negative — a downward reversal. The MACD line changes its slope from rising to falling — the indicator stopped rising and started falling. Line diverges from signal ↕️ Both The distance between the main line and the signal line increased by the specified amount. The MACD line moves away from the signal line — momentum is strengthening. Line converges to signal ↕️ Both The distance between the main line and the signal line decreased by the specified amount. The MACD line converges to the signal line: the distance shrinks, a crossover may be brewing.
Parameter Type Default Range / Values Min Delta (Line converges to signal, Line diverges from signal)float 0 0>