Strategies & technical analysis

Best MACD Settings for Gold (XAUUSD): 12/26/9 vs Faster and Slower, by Timeframe

Most gold traders keep MACD on 12/26/9, and the internet is full of 'secret' faster settings for scalping. We ran five common settings on real gold data on three timeframes, with a cost on every trade. The default behaved more consistently than most of the fast settings, the very fast 3/10/16 gave the most false crosses on the hourly chart, and on the daily chart MACD worked best as a filter rather than a system. Here is what we saw and how to choose.

Gold spot$3,528.2−99.8 (−2.75%)NextUS Q3 GDP (second estimate) and October PCE inflationin 4d 20h · Wed 13:30 GMTMarket opencloses in 4h 34mRange$123.2
Gold, last 60 daily candlesGold, last 60 daily candlesHigh $4,688 · low $3,515 · last session range $123.2 · 20-day average daily range $94.5$4,000$4,500$3,536Sep ’26Oct ’26Nov ’26
COMEX gold, daily open/high/low/close, last 60 sessions · data to 20 Nov 2026 · xauusdglobal.com

The short answer

The standard MACD setting is 12/26/9, and for gold it is still a good place to start. We ran it next to four common alternatives (8/17/9, 5/35/5, 3/10/16 and 24/52/9) on real gold data, with a cost of $0.30 per ounce on every trade:

  • Hourly chart: 12/26/9 and the slower 24/52/9 behaved the most consistently. The fastest setting, 3/10/16, gave the most crosses and the most false signals.
  • 4-hour chart: faster settings suited this timeframe better, because a 4-hour bar already removes much of the noise.
  • Daily chart (since 2015): MACD worked better as a trend filter than as a stand-alone crossover system.

So the honest answer is: pick the timeframe first, then the setting. No setting turns MACD into a stand-alone system on gold, and results depend on settings, timeframe and costs, so test your choice on your own data before risking money.

What the three MACD numbers mean

MACD has three parts, and each number controls one of them:

Number What it controls Default
First (fast) Length of the fast exponential moving average (EMA) 12
Second (slow) Length of the slow EMA 26
Third (signal) Length of the EMA drawn on the MACD line itself 9

The MACD line is the fast EMA minus the slow EMA. When gold is rising quickly, the fast EMA pulls away above the slow one, so the MACD line goes up. The signal line is a smoothed copy of the MACD line. The histogram shows the gap between the two.

A smaller fast number makes MACD react sooner. A bigger slow number makes it calmer. A smaller signal number makes the crosses come earlier, and more often. Our MACD on gold guide explains the histogram, the zero line and divergence in more detail.

How we tested

We kept the test simple on purpose, so you can repeat it:

  • Data: COMEX gold futures (GC=F) bars from Yahoo Finance, as stored in our site data. Hourly bars from 11 June 2024 to 12 November 2026 (13,906 bars). The 4-hour bars were built from those hourly bars in four-hour UTC blocks. Daily closes from January 2015 to 12 November 2026.
  • Rule: buy when the MACD line crosses above the signal line, sell short when it crosses below. Always in the market, flipping on every cross.
  • Cost: $0.30 per ounce per trade on hourly and 4-hour bars, $0.50 on daily bars, for spread and slippage.
  • Split: we cut each test in two halves to see if results held up. The hourly and 4-hour split is 26 August 2025. The daily split is 1 January 2021.
  • Results are in US dollars per ounce. One standard lot is 100 ounces, so $100 per ounce is $10,000 on one lot.

This is a test of the setting, not a trading plan. Nobody should trade every MACD cross with no stop.

What we saw on the hourly chart

We are not printing a profit and loss table here. A crossover test with no stop and no filter is not a trading plan, and a table of dollar figures tempts people to copy it. What the test is good for is showing how each setting behaves on gold. On the hourly chart:

  1. Faster settings crossed far more often. The two fastest settings (5/35/5 and 3/10/16) gave about twice as many crosses as the default over the same months. Every extra cross pays the spread again, and on hourly gold many of those extra crosses were false signals that reversed within a few bars.
  2. The default 12/26/9 and the slow 24/52/9 behaved the most consistently. Their behaviour looked similar in both halves of the test, which matters more than any total. A setting that only looks good in one half is probably luck.
  3. Most crosses did not work out, for every setting. Only about one cross in three went on to a bigger move. The useful crosses were the ones that caught a long trend. If you cannot sit through six or seven small losses in a row, a crossover method will feel terrible, whatever the numbers say.

The practical lesson: on the hourly chart, a faster MACD does not mean a better MACD. It mostly means more signals to filter.

What we saw on the 4-hour chart

On the 4-hour chart the picture changed. The faster settings behaved better here than on the hourly chart. That makes sense: a 4-hour bar already smooths out much of gold’s hourly noise, so a fast MACD on a 4-hour chart is still slower than the default on the hourly chart.

Be careful with any 4-hour test. There were only about 170 to 500 crosses per setting, the test covers about 29 months, and that period included a huge rally to a record close of $5,318.4 on 29 January 2026 and a fall of more than 20% afterwards. Strong trends flatter any crossover system for a while. Read our guide on whether a strategy really works before trusting a sample this size.

What we saw on the daily chart (2015 to November 2026)

On the daily chart, a bare always-in, flip-on-cross system did not hold up well for any setting. Two reasons explain most of it:

  • Gold spent most of this period in a long uptrend. Every short trade the system took fought that trend.
  • A daily MACD cross often comes after much of the move is over, so the system bought late and sold late.

This does not mean MACD is useless on daily charts. It means a bare daily crossover is not a strategy. Many swing traders use the daily MACD only as a filter (for example, only looking for longs while it is above zero) and take their entries on a lower timeframe. Used that way, the daily MACD answers one simple question: “Is momentum on my side right now?”

Why the timeframe matters more than the numbers

Changing 12/26/9 to 8/17/9 feels like a big decision, but on gold it changes the result less than moving from the hourly chart to the 4-hour chart. Here is why, in plain words:

  • Noise. Gold often moves $5 to $15 in an hour for no lasting reason. On the hourly chart, MACD reacts to that noise. On the 4-hour chart, much of it is averaged away.
  • Costs. Every cross costs the spread plus any slippage. More crosses per month means a bigger share of your result goes to costs.
  • News. A single CPI or jobs candle can cross the hourly MACD both ways in minutes. On the 4-hour or daily chart, the same news is one candle among many.

Which setting should you use?

Here is a simple way to decide, based on what the test showed:

Your style Timeframe Setting to start with Why
Intraday, a few trades a day 1-hour 12/26/9 Consistent in both halves; fewer false crosses than faster settings
Intraday, fewer trades 1-hour 24/52/9 Fewer crosses, calmer signals, consistent in both halves
Swing, holding for days 4-hour 12/26/9 or 5/35/5 Less noise on 4-hour bars; faster ones catch turns sooner
Position, holding for weeks Daily 12/26/9 as a filter only Daily crosses come late; use them for direction, not entries
Scalping, 1–5 minute Not tested Be very careful Hourly results suggest more crosses means more cost and noise

Whatever you choose, keep it for at least 50 to 100 trades before judging it. Changing settings after three losses is the fastest way to never learn anything.

Better than changing settings: filter the cross

In our hourly test most crosses did not turn into a real move. The fix is rarely a new setting. It is to throw away weak crosses. Common filters gold traders use:

  1. Zero-line filter. Take bullish crosses only when MACD is above zero, bearish only below zero. This keeps you with the bigger trend.
  2. Level filter. Only act on a cross that happens at a real support or resistance level. See how to find support and resistance on gold.
  3. Higher-timeframe filter. Use the 4-hour MACD for direction and the 1-hour cross for timing.
  4. News filter. Ignore crosses in the hour around big US data. A single CPI or jobs candle can cross MACD both ways in minutes.

We did not test these filters here. Test any filter yourself before using it with money.

A word about divergence

Divergence is when gold makes a higher high but MACD makes a lower high (or the opposite at lows). It is popular because it looks clear on old charts. In a strong gold trend, MACD can show divergence three or four times while price keeps climbing. Treat divergence as “momentum is slowing”, not “price will turn now”. Wait for price itself to break structure before acting.

Settings do not remove risk. In our hourly test most crosses did not work out, whatever the setting. Size every trade so that a long losing run cannot hurt your account badly. The position size calculator works this out from your stop distance.

Test it yourself in 20 minutes

  1. Open a gold chart on the 1-hour timeframe and add MACD (12/26/9).
  2. Scroll back three months. Mark every signal-line cross.
  3. For each cross, write down the price at the cross and the price at the next opposite cross.
  4. Take away about $0.30 for costs on each trade.
  5. Add up the results. Then repeat with one other setting.

Results depend on settings, timeframe, data and costs, so test it on your own data before risking money. If your charts look very different from ours, check your data source and timezone. Daily candles differ between platforms, which changes daily MACD values; our guide to the gold daily candle close explains why.

Key takeaways

  • 12/26/9 is still a sensible default for gold, and it behaved consistently in both halves of our hourly test.
  • Very fast settings (3/10/16) gave the most crosses on the hourly chart. More crosses meant more cost and more noise.
  • The 4-hour chart suited faster settings better, but the sample is small and the period was very trendy.
  • On the daily chart, use MACD as a filter, not as a stand-alone flip-on-cross system.
  • Most crosses do not work out, so long losing runs are normal. Plan for them, and test any setting on your own data first.

Data and method

  • COMEX gold futures (GC=F) hourly and daily bars via Yahoo Finance, as stored in the site data files gold-h1.json and gold-daily.json (updated 12 November 2026).
  • MACD = EMA(fast) − EMA(slow) of closes; signal = EMA(signal) of MACD. Entries and exits at the close of the crossing bar. No stops, no position sizing, one unit per trade.
  • Costs: $0.30 per ounce per trade (hourly, 4-hour), $0.50 (daily). Swaps not included.
  • Past results do not predict future results.

Educational content only, not financial advice. Trading gold with leverage carries a high risk of loss.

Frequently asked questions

What is the best MACD setting for gold?

There is no single best setting. In our test the default 12/26/9 and the slower 24/52/9 behaved the most consistently on the hourly gold chart. On the 4-hour chart the faster settings were less noisy. On the daily chart MACD worked better as a trend filter than as a crossover system. The timeframe mattered more than the numbers. Test any setting on your own data before risking money.

Is MACD 12 26 9 good for XAUUSD?

It is a reasonable default. On hourly gold from June 2024 to November 2026 a simple 12/26/9 signal-line crossover gave about 1,050 crosses and behaved consistently in both halves of the test. Most crosses did not work out; the useful ones were the few that caught long trends. That is why filters matter more than the numbers.

What MACD settings are best for gold scalping on the 5-minute chart?

We did not test the 5-minute chart, because our site data starts at 1-hour bars. Our hourly results are a warning, though: the fastest setting, 3/10/16, gave the most crosses and the most false signals on the hourly chart. Faster settings give more signals, and on gold more signals usually means more costs and more false crosses.

What does 12, 26, 9 mean in MACD?

12 is the fast moving average, 26 is the slow moving average and 9 is the signal line. The MACD line is the 12-period EMA minus the 26-period EMA. The signal line is a 9-period EMA of the MACD line. The histogram is the gap between the two lines.

Should I change MACD settings for gold because it is volatile?

Changing the periods does not fix volatility. Gold’s MACD values get bigger when gold’s price and swings get bigger, whatever the settings. What helps more is choosing a timeframe where the signal is not buried in noise, and filtering crosses with price structure or the zero line.

Is MACD better on the 4-hour or the 1-hour gold chart?

In our test the 4-hour chart gave fewer crosses and fewer false signals for most settings, and the faster settings suited it better than the hourly chart. The 4-hour sample was only about 170 to 500 crosses over about 29 months, so treat it as a clue, not proof.

Sources and further reading

External sites are independent of XAUUSD Global. Check dates and data yourself.

Comments

No comments yet.

Leave a comment

Comments are checked before they appear. Be respectful: no promotion, no trade signals. Rules · Privacy. No email needed.