Strategies & technical analysis

Williams Alligator and Fractals on Gold: Rules, Settings and a Tested XAUUSD System

The Williams Alligator is three smoothed moving averages that show whether gold is trending or sleeping. Fractals mark small swing highs and lows that work as triggers and stop levels. Put together, they make a simple trend-following system. This guide explains both tools in plain words, gives exact rules, and shows how the system behaved on two years of hourly gold and on daily gold since 2015, so you can test it yourself.

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 Williams Alligator has three lines, all smoothed moving averages of the median price:

  • Jaw (blue): 13 periods, shifted 8 bars forward.
  • Teeth (red): 8 periods, shifted 5 bars forward.
  • Lips (green): 5 periods, shifted 3 bars forward.

When the lines are spread apart in order (lips above teeth above jaw), gold is trending up. When they are tangled, the Alligator is “sleeping” and there is no clear trend.

Fractals mark small swing highs and lows. A simple system buys when the Alligator is awake and pointing up and price breaks above the last up fractal, then exits when price closes back below the teeth. On our gold data only about a third of trades caught a trend; the rest were small exits. That is normal for a trend system, which depends on a few long runs. Test it on your own data before risking money.

The Alligator in plain words

Bill Williams described the market as an alligator:

  • Sleeping: lines tangled. The market is resting and moving sideways.
  • Waking up: lines start to separate. A move may be starting.
  • Eating: lines are spread apart in order. The market is trending.
  • Full: lines start to come back together. The trend is tiring.

The forward shift is what makes this different from normal moving averages. Shifting each line forward makes it react more slowly, which filters out small wiggles. The cost is lag: the Alligator always confirms a trend late.

The median price

The Alligator uses the median price of each candle, which is (high + low) ÷ 2, not the close. For a gold candle with a high of $4,010 and a low of $3,990, the median price is $4,000.

Smoothed moving average (SMMA)

An SMMA is a slow, smooth average. Each new value is the old value times (n − 1), plus the new price, all divided by n. It reacts more slowly than a simple or exponential average of the same length.

Fractals in plain words

A fractal is a five-candle pattern:

  • Up fractal: the middle candle has the highest high of the five.
  • Down fractal: the middle candle has the lowest low of the five.

On MT5 they appear as small arrows above or below candles. Two points matter:

  1. A fractal is only confirmed after two more candles close. Until then, a new higher high could replace it.
  2. Fractals are everywhere. On their own they are just swing points. They become useful when filtered by trend, which is the Alligator’s job.

Traders use fractals as:

  • Triggers: in an uptrend, a break above the last up fractal shows buyers pushing to a new short-term high.
  • Stops: in an uptrend, the last down fractal is a natural place for a stop.

The combined system (exact rules)

These are the rules we ran. They are deliberately simple so you can check them.

Long trades

  1. The Alligator is awake and pointing up: lips above teeth, teeth above jaw.
  2. A candle closes above the most recent confirmed up fractal and above the lips. Enter at that close.
  3. Exit when a candle closes below the teeth.

Short trades

  1. Lips below teeth, teeth below jaw.
  2. A candle closes below the most recent confirmed down fractal and below the lips. Enter.
  3. Exit when a candle closes above the teeth.

Costs: $0.30 per ounce per trade. One trade at a time. Results in dollars per ounce (0.01 lot is usually 1 ounce).

How the system behaved on gold

Chart Period Trades Share of trades that caught a trend
Hourly 11 Jun 2024 – 12 Nov 2026 388 about 36%
Daily Jan 2015 – 12 Nov 2026 85 about 35%

Our own run on COMEX gold futures (GC=F) via Yahoo Finance, 17 November 2026. Past behaviour does not predict future results.

On the hourly chart, the three lines were tangled (sleeping) on about 19% of bars, and on the daily chart about 19.5%.

We are not printing dollar totals. One run on one market is not proof that a rule pays, and the period was unusually kind to trend systems.

What the run means, honestly

  • Most trades are small and short for a trend system. About a third of trades caught a real trend; the rest were small exits back below the teeth. A trend system depends on the few long runs, so cutting them early ruins it.
  • The period helped any trend method. Gold rose from about $2,320 in June 2024 to a record above $5,400 in January 2026. In a long sideways year, the same rules would likely chop up and down and pay a lot of costs.
  • Losing streaks will be long. With about a third of trades catching a trend, eight or ten small losses in a row are quite possible. You must size small to survive them.
  • No stop-loss was used except the teeth exit. A sudden news spike can jump past it. In live trading most traders add a hard stop at the last opposite fractal.
  • Results depend on settings, timeframe and costs. Test the rules on your own data and platform before risking money.

A worked example (how to read the chart)

Say gold is on the hourly chart around $4,050.

  1. The lines have been tangled for a day between $4,030 and $4,060. The Alligator is sleeping. No trades.
  2. Gold pushes up. The lips cross above the teeth, then the teeth cross above the jaw. The Alligator is waking up and pointing up.
  3. The last confirmed up fractal is at $4,062. A candle closes at $4,066, above it and above the lips. Enter long.
  4. The last down fractal is at $4,041. A trader who adds a hard stop puts it just below, at about $4,040. Risk: $26 per ounce.
  5. Gold trends up for several hours. The trader stays in while candles close above the teeth.
  6. A candle finally closes below the teeth at $4,112. Exit. Result: +$46 per ounce, about 1.8 times the risk.

This example is hypothetical, to show how the rules work step by step.

Settings and timeframes

Timeframe Notes
5 minute and below Many crosses; costs hurt; use only with a higher-timeframe trend
15 minute – 1 hour Popular for day trading gold; check the 4-hour trend first
4 hour – daily Fewer, longer trades; wide stops, so smaller lot sizes

Most traders keep the default 13/8/5 with shifts 8/5/3. Changing them changes everything, so if you do, test on at least 100 trades before trusting the result. Our gold indicator settings page lists the settings we have tested.

How to combine it with other tools

  • Market structure: take Alligator longs only when the higher timeframe shows higher highs and higher lows. See market structure on XAUUSD.
  • Sessions: gold trends most in London and New York. Breaks during the quiet Asian hours often fail.
  • News: pause new entries before CPI, NFP and Fed decisions.
  • One trend tool is enough. The Alligator, the Supertrend and moving-average crosses all measure trend. Pick one.

Common mistakes

  • Trading while the Alligator sleeps. Tangled lines mean no trend. Wait.
  • Using unconfirmed fractals. A fractal is not real until two more candles close.
  • Expecting a high win rate. This is a trend system. Small, frequent losses are part of it.
  • Lot size too big. Size from the stop with the position size calculator so a long losing streak does not hurt you.
  • Adding more indicators to “fix” losses. You will usually just add lag.

Checklist

  1. Lines spread apart in order (up or down)?
  2. Higher-timeframe trend agrees?
  3. Confirmed fractal broken by a candle close?
  4. Hard stop at the last opposite fractal, and lot sized for 1% risk or less?
  5. No major news in the next hour?
  6. Exit rule clear: close beyond the teeth?

This page is education, not financial advice. The worked example is hypothetical. Trading gold with leverage carries a high risk of loss.

Frequently asked questions

What are the Williams Alligator settings?

The standard settings are a 13-period jaw shifted 8 bars forward, an 8-period teeth shifted 5 bars, and a 5-period lips shifted 3 bars. All three are smoothed moving averages of the median price, (high + low) / 2. Most platforms, including MT5, use these by default.

Does the Alligator work on gold?

As a trend filter, it can help. Our simple Alligator-plus-fractal system won only about 36% of trades on hourly and daily gold, but the winners were much bigger than the losers, and it finished positive after a $0.30 cost: plus $1,317 per ounce on 388 hourly trades and plus $958 per ounce on 85 daily trades. Gold trended strongly in that period, which helps any trend system.

What is a fractal in trading?

A Bill Williams fractal is a five-candle pattern. An up fractal is a candle whose high is higher than the two candles before and the two after. A down fractal is a candle whose low is lower than the two on each side. A fractal is only confirmed two candles after it forms.

What does it mean when the Alligator is sleeping?

When the three lines are tangled together, the Alligator is ‘sleeping’: there is no clear trend. On our hourly gold data the lines were tangled about 19% of the time. Trend traders usually stay out during these periods.

Is the Alligator good for gold scalping?

It works on any timeframe, but on 1-minute and 5-minute gold charts the lines cross often and costs take a bigger share of each trade. Most traders use it on 15-minute charts and higher, and confirm the trend on a higher timeframe.

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.