Moving Average Convergence Divergence (MACD)
MACD is a trend-following momentum indicator that shows the relationship between two EMAs. It consists of the MACD line, signal line, and histogram, making it one of the most versatile indicators available.
- Family
- Trend
- Series
- main · signal · histogram
- Best timeframes
- H1 · H4 · D1
- Last updated
- 2026-09-24
TL;DR
- MACD is a trend indicator used in technical analysis
- MACD crossing above signal line is bullish; crossing below is bearish. Histogram shows momentum strength. Zero-line crossovers indicate trend direction changes.
- Best timeframes: H1, H4, D1
- Skip to API docs
What is Moving Average Convergence Divergence?
MACD is a trend-following momentum indicator that shows the relationship between two EMAs. It consists of the MACD line, signal line, and histogram, making it one of the most versatile indicators available.
How MACD is calculated
MACD Line = EMA(12) - EMA(26)
Signal Line = SMA(9) of MACD Line
Histogram = MACD Line - Signal Line How to interpret MACD
MACD crossing above signal line is bullish; crossing below is bearish. Histogram shows momentum strength. Zero-line crossovers indicate trend direction changes.
Trading strategies using MACD
Strategy 1: MACD Crossover
The classic MACD strategy trades when the MACD line crosses the signal line.
Entry rules
Buy when MACD crosses above signal line. Sell when MACD crosses below signal line.
Exit rules
Exit on reverse crossover or when histogram starts declining after reaching extreme.
Strategy 2: MACD Divergence
Divergence between MACD and price signals potential reversals.
Entry rules
Enter long on bullish divergence (price lower low, MACD higher low). Enter short on bearish divergence.
Exit rules
Target previous swing level. Use ATR for stop loss placement.
Combining MACD with other indicators
MACD works best when combined with complementary indicators:
- MACD + RSI: Combine for stronger confluence signals
- MACD + EMA: Combine for stronger confluence signals
- MACD + ADX: Combine for stronger confluence signals
MACD across different timeframes
MACD works across all 7 timeframes but performs best on H1, H4, D1 for most trading styles.
Accessing MACD via the TickAtlas API
GET https://tickatlas.com/v1/indicator
Python example
import requests
url = "https://tickatlas.com/v1/indicator"
headers = {"X-API-Key": "YOUR_API_KEY"}
params = {
"symbol": "EURUSD",
"indicator": "MACD_main",
"timeframe": "H1"
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(data) Example response — illustrative values
{
"success": true,
"data": {
"symbol": "EURUSD",
"indicator": "MACD_main",
"timeframe": "H1",
"value": -0.000798,
"updated_at": 1790272367,
"server_time": "2026-09-24T17:52:47+00:00",
"bid": 1.13663,
"ask": 1.13675
}
} Common mistakes to avoid
- Trading MACD signals without considering the overall trend
- Ignoring MACD histogram divergence which often precedes the crossover
- Using MACD in very choppy/sideways markets where it generates many false signals
Frequently asked questions
What are the best MACD settings?
The standard settings (12, 26, 9) work well for most markets. Some traders use (8, 17, 9) for faster signals or (5, 35, 5) for smoother signals on lower timeframes.
How to read the MACD histogram?
Rising histogram bars (becoming more positive) indicate increasing bullish momentum. Falling bars indicate weakening momentum. The histogram crossing zero corresponds to the MACD/signal line crossover.
Calculation details
Parameters. MACD Line = EMA(12) − EMA(26) of the bar close. Signal Line = a 9-period simple moving average of the MACD Line. Histogram = MACD Line − Signal Line. These are fixed and not configurable per request. Platforms that compute the signal line as an exponential average will generally show different signal and histogram values from this API, even on identical prices.
Timestamps. updated_at is UTC.
Price series. Indicators are computed on our data, not an exchange's consolidated tape, and session coverage varies by symbol. For US equities, the half-hour price history we serve includes rows outside each symbol's trading hours that repeat the previous bar's prices exactly; these are not used in the calculation.
Continue learning
More trend indicators
- Indicator
Relative Strength Index (RSI)
The Relative Strength Index (RSI) is a momentum oscillator that measures the speed and magnitude of price movements on a scale from 0 to 100.
Read more - Indicator
Exponential Moving Average (EMA)
The Exponential Moving Average gives more weight to recent prices, making it more responsive to new information than the SMA.
Read more - Indicator
Average Directional Index (ADX)
The Average Directional Index measures trend strength regardless of direction.
Read more
Put MACD to work in your application.
Sign up with $2.50 of starting credit and query pre-calculated MACD data across 7 timeframes, from M1 to D1.