Watch the lesson
Trending or Ranging? Reading Volatility with the Last Closed 4H ATR (11:24). Also on the free lessons page, with chapters. Education only. The video explains how the rules work; it is not personal advice.
What the three numbers mean
- Fast length (12): the faster EMA of price.
- Slow length (26): the slower EMA of price. The MACD line is fast minus slow.
- Average length (9): an EMA of the MACD line itself, often called the trigger line. The histogram is MACD minus this average.
Shorter lengths make everything react faster. The ratio between fast and slow matters too: a wider gap (5-35) produces larger swings in the MACD line.
Common sets compared
| Setting | Character | Typical use | Trade-off |
|---|---|---|---|
| 12-26-9 | Default, balanced | Most timeframes; shared reference | Late at turns, noisy in ranges |
| 8-17-9 | Faster | Short-term charts, quicker momentum shifts | More crosses that reverse |
| 5-35-5 | Fast trigger, wide spread | Spotting momentum changes early | Very jumpy histogram |
| 3-10-16 | Very fast line, slow average | Short-term swing timing | Line whipsaws; needs context |
| 19-39-9 | Slower | Higher timeframes, filtering noise | Very late on turns |
None of these is “best”. They are different points on a speed-versus-noise curve.
Choosing by holding period
A practical rule: if your typical idea lasts about N candles on your chart, the slow length should be in the same neighborhood as N or larger. Holding for 5 to 10 candles on a 15-minute chart with a 26-period slow EMA is reasonable; holding for 2 to 3 candles might justify a faster set. Holding for weeks on a Daily chart, the default is already fast; some traders read it on the Weekly instead of changing the numbers.
Changing timeframe vs changing settings
A 12-26-9 MACD on a 1-hour chart is similar (not identical) to a 48-104-36 MACD on a 15-minute chart. Often the cleaner choice is to keep the default and read it on a different timeframe. That keeps your numbers comparable with what everyone else is looking at, which matters for widely watched tools.
How to test settings without fooling yourself
- Write down one rule, for example “histogram crosses above zero on a closed candle while price is above the 200 EMA.”
- Use TradingView's Bar Replay so you can't see what comes next.
- Record 50 or more events per setting, including all the failures.
- Compare frequency, how often the cross reversed within 3 candles, and how late the cross was relative to the swing.
- Prefer the setting that is “good enough” across several markets over one that is perfect on a single chart.
Optimizing settings on one chart until they look perfect is called overfitting. It almost always looks worse on the next chart.
Worked comparison (illustrative)
On the same 1-hour chart over two weeks, suppose the default 12-26-9 produced 11 zero-line crosses of the histogram, 5 of which reversed within three candles. A 5-35-5 set produced 19 crosses, 10 of which reversed quickly, but it caught the two major turns about two candles earlier. A 19-39-9 set produced 6 crosses, 2 of which reversed quickly, and caught the turns three candles later. That's the trade-off in numbers: earlier means noisier.
Settings that matter more than the lengths
- EMA vs SMA: TradingView's MACD lets you choose the average type for the oscillator and for the trigger line. EMAs react faster.
- Source: close is standard.
- Closed candles: read crosses on closed candles. A histogram that flips mid-candle can flip back.
- Context: MACD crosses in a range behave very differently from crosses in a trend. The video shows how a last-closed 4-hour ATR reading helps tell the two apart.
Common mistakes
- Choosing settings from a screenshot where they look perfect.
- Changing settings after every loss.
- Using a fast set on a slow timeframe and a slow set on a fast one without a reason.
- Treating a histogram color change as an instruction. Our MACD histogram colors guide explains what each shade does and doesn't mean.
Smart MACD keeps the standard 12-26-9 by default (fully adjustable) and adds the 4-hour ATR environment, so you can see whether a cross happened in an expanding or contracting market. For a combined momentum read, MACD Momentum Score blends MACD with STC and ADX.
Frequently asked questions
What are the best MACD settings?
There's no single best set. 12-26-9 is the default and a sensible starting point; faster sets react sooner with more noise, slower sets react later with less.
What MACD settings are good for day trading?
Many day traders keep 12-26-9 on 5-minute to 15-minute charts, or try faster sets like 8-17-9. Test on closed candles with Bar Replay before relying on any set.
What MACD settings work for swing trading?
The default on 4-hour or Daily charts is common. Some use slower sets like 19-39-9 to cut noise, at the cost of later turns.
Should I use EMA or SMA in MACD?
The classic MACD uses EMAs. SMAs make it smoother and slower. Pick one and keep it consistent.
Is changing timeframe better than changing MACD settings?
Often yes. Reading the default on a higher timeframe keeps your numbers comparable with what most traders watch.
Keep reading
MACD divergence: how to spot it, confirm it and where it fails
How to spot regular and hidden MACD divergence with confirmed pivots, why it can repaint, and why divergence alone is a weak reason to act.
ATR stop loss: how to size a stop by volatility
How an ATR stop loss works: the formula, choosing a multiplier, combining ATR with structure, and why a 4-hour ATR is steadier than the chart's own.
Multi-timeframe RSI: reading strength across timeframes
How to read RSI on several timeframes at once: the 50 line as a regime filter, closed higher-timeframe candles, and weighting rows.
More in MACD and momentum, or browse all guides by topic. Questions? Email contact@brainiosoftware.com.
General information only. This guide is general education, not personal financial product advice or a recommendation to buy or sell anything. Indicator readings, alerts and screener results are not trade recommendations. Examples use illustrative numbers. TradingView is a third-party platform; we are not affiliated with or endorsed by TradingView. Education only. Not financial advice. Trading involves risk of loss. Read the full risk disclaimer.