TraderAI
FeaturesPricingBlog
Sign InGet Started
  1. Home
  2. Indicator library
  3. MACD
Momentum

MACD

MACD (Moving Average Convergence Divergence) measures the gap between a fast and a slow exponential moving average of the close. The MACD line shows that gap, the signal line is a smoothed version of it, and the histogram shows the difference between the two. It describes trend direction and how quickly momentum is changing.

Open on live chart All indicators

Adds MACD to a free BTC/USDT chart.

Formula

EMA(x, N): alpha = 2 / (N + 1);  first value = SMA of the first N values
MACD = EMA(C, fast) - EMA(C, slow)
Signal = EMA(MACD, signal)
Histogram = MACD - Signal

How TraderAI calculates it

TraderAI uses lengths 12, 26 and 9 by default. Each exponential average starts from the simple average of its first values and then follows the standard EMA formula. The MACD line, signal line and histogram all start once the 26-period average and the 9-period signal exist, after 34 candles. Values are in price units and plotted in their own pane.

Live example

How traders read it

  1. 1

    A MACD line above zero means the fast average is above the slow one, often read as an upward bias; below zero, a downward bias.

  2. 2

    The MACD line crossing its signal line is read as momentum turning; a growing histogram shows momentum building and a shrinking one shows it fading.

  3. 3

    Divergence between price and MACD can warn that a trend is losing strength before price turns.

Limitations

  • Because it is built from moving averages, MACD reacts after price has moved and produces many crosses in sideways markets.
  • Values are in price units, so MACD readings cannot be compared between assets with different prices.

Settings and defaults

SettingDefaultAllowed range
Fast length121 to 100
Slow length262 to 200
Signal length91 to 100

What it plots

Drawn in its own pane below the price chart, with its own scale.

LineUnitDrawn asFirst value
MACD linePriceLineafter 34 candles
SignalPriceLineafter 34 candles
HistogramPriceHistogramafter 34 candles

Questions

What is MACD?

MACD (Moving Average Convergence Divergence) measures the gap between a fast and a slow exponential moving average of the close. The MACD line shows that gap, the signal line is a smoothed version of it, and the histogram shows the difference between the two. It describes trend direction and how quickly momentum is changing.

How does TraderAI calculate MACD?

TraderAI uses lengths 12, 26 and 9 by default. Each exponential average starts from the simple average of its first values and then follows the standard EMA formula. The MACD line, signal line and histogram all start once the 26-period average and the 9-period signal exist, after 34 candles. Values are in price units and plotted in their own pane.

What are the default settings of MACD?

The defaults are Fast length: 12, Slow length: 26, Signal length: 9. You can change every setting on the live chart.

Can I use MACD for free on TraderAI?

Yes. Every indicator in the library can be added to the free live chart. The free plan keeps up to 2 indicators active at the same time; Pro lets you combine more on one chart.

Educational content. Indicators describe past prices; they do not predict future prices and are not investment advice.

Category
Momentum
Drawn as
Drawn in its own pane below the price chart, with its own scale.
First value
after 34 candles
Formula version
traderai-macd-ema-sma-v1
Open on live chart

Free plan: up to 2 indicators active at the same time. Pro lets you combine more indicators on one chart.

See plans

Related indicators

  • RSI
  • Stochastic Oscillator
  • Commodity Channel Index
  • RSI + Smoothing
  • MACD + Moving average
  • Awesome Oscillator (AO)
How TraderAI's AI reads a chart