Williams Alligator

The Williams Alligator is Bill Williams’ trend tool: three smoothed moving averages of the median price (jaw, teeth and lips) shifted forward so that their spread shows whether a trend is running.

The Williams Alligator is a set of three moving averages that Bill Williams dressed up as an animal.1 When the three lines are tangled together the alligator is asleep and the market is going nowhere; when they fan out in order the alligator is feeding and a trend is under way.1 The idea behind it is that markets spend most of their time moving sideways, so a trader should wait for the rarer trending phases.1 This entry covers the settings, the smoothing formula, how to read the lines and where they mislead.

Category
Indicators and Tools
Reading time
7 min
Also called
Alligator indicator, Bill Williams Alligator, Alligator jaw teeth lips
Updated

The Williams Alligator in plain words

The three lines are the jaw (blue, slowest), the teeth (red) and the lips (green, fastest).1 Each one is a smoothed moving average of the median price, (high + low) ÷ 2, and each is drawn a few bars to the right of where it was calculated.1

When the lines are close together or crossing each other, the market lacks direction. When the lips, teeth and jaw separate and point the same way, a trend is running. When they start to come back together, the trend is tiring.1

How to build and read the Alligator, step by step

  1. Find each bar’s median price

    Median price = (high + low) ÷ 2.1

  2. Smooth it three times

    Jaw: 13-period smoothed moving average (SMMA). Teeth: 8-period SMMA. Lips: 5-period SMMA.1 Smoothed average = (previous value × (N − 1) + new price) ÷ N.2

  3. Shift each line forward

    Plot the jaw 8 bars ahead, the teeth 5 bars ahead and the lips 3 bars ahead.1

  4. Check whether the lines are tangled

    Lines that are intertwined or crossing mean the alligator is sleeping and the market is directionless.1

  5. Watch for the mouth to open

    A lips line crossing up through the other two is read as a possible buy, a cross down as a possible short.3

  6. Ride the spread, exit as it closes

    Wide, ordered lines mark a running trend; lines drawing back together suggest taking profit.1 Pair exits with a Stop Loss.

Worked examples

Example 1 — Updating the lips line

Formula

A hypothetical stock’s previous 5-period SMMA (the lips) is $50.00. Today’s bar has a high of $52 and a low of $50.

Example 1 — Updating the lips line — calculation
Median price($52 + $50) ÷ 2 = $51.00
Previous lips × 4$50.00 × 4 = $200.00
Add today’s median$200.00 + $51.00 = $251.00
New lips value$251.00 ÷ 5 = $50.20

The new value is plotted 3 bars to the right of today’s bar. The smoothing means a $1 jump in the median price moves the lips by only $0.20.

Example 2 — An open mouth in an uptrend

Trend

On a hypothetical chart, price trades at $55. The lips read $54.10, the teeth $53.20 and the jaw $52.00, and all three are rising.

Example 2 — An open mouth in an uptrend — calculation
Order of the linesLips > teeth > jaw
Lips − teeth$54.10 − $53.20 = $0.90
Teeth − jaw$53.20 − $52.00 = $1.20
Lips − jaw$54.10 − $52.00 = $2.10

The lines are stacked fastest-on-top and spread apart, so the alligator is feeding on an uptrend.1 If the $2.10 gap starts to shrink, the trend is losing steam.

Example 3 — Buying a sleeping alligator

Whipsaw

A hypothetical stock has moved sideways for weeks and the three lines sit within $0.30 of each other. The lips tick above the other two, and a trader buys 200 shares at $40.50. Two days later the lips cross back down and the trader sells at $39.90.

Example 3 — Buying a sleeping alligator — calculation
Entry price$40.50
Exit price$39.90
Loss per share$40.50 − $39.90 = $0.60
Loss on 200 shares200 × $0.60 = −$120

Crosses inside tangled lines are the classic false signal in choppy markets.3 Williams’ advice was to stay on the sidelines while the alligator sleeps.3 See Whipsaw.

The three Alligator lines

AspectJawTeethLips
ColourBlue1Red1Green1
SMMA period1318151
Shifted forward8 bars15 bars13 bars1
SpeedSlowestMiddleFastest

How traders use the Williams Alligator

  • Filtering out sideways markets

    Tangled lines tell the trader to stand aside; MetaTrader’s description says trends appear only about 15–30% of the time.1 See Range.

  • Timing trend entries

    A lips line breaking through the teeth and jaw is used as an early sign that a new trend is starting.3 See Trend Following.

  • Managing open trades

    While the lines stay spread and ordered, traders hold; when they converge or flatten, they look to take profit.3

  • Combining with fractals

    Williams paired the Alligator with fractals: MetaTrader treats a fractal as an active signal once it forms beyond the Alligator’s mouth.4 The Awesome Oscillator comes from the same toolkit.

Advantages and disadvantages

Advantages

  • Gives a clear visual answer to “is this market trending?”.
  • Fixed default settings that most platforms share.
  • Smoothing and the median price reduce the effect of single odd bars.
  • Works as both an entry filter and an exit guide.

Disadvantages

  • Built from moving averages, so it reacts late to turns.
  • Gives repeated false crosses in choppy markets.
  • The forward shift can make the lines look more predictive than they are.
  • No fixed rule for how wide the mouth must open before acting.

Going deeper

Read as far as you need. Each level builds on the one before it.

Three averages, one picture

Beginner

Under the animal story, the Alligator is simply a fast, a medium and a slow Moving Average of the same price.1 Fast above slow means prices are rising; fast below slow means they are falling.

The periods 5, 8 and 13 are Fibonacci numbers.3

Why smoothed averages and a shift

Intermediate

A smoothed moving average keeps a share of every past value, so it turns more slowly than a simple average of the same length.2 That makes the lines steadier and the crosses rarer.

Each line is then moved to the right: the jaw by 8 bars, the teeth by 5 and the lips by 3.1 The shift pulls the lines away from current price, so price has to move further before it crosses them.

Platform differences and testing

Advanced

MetaTrader defines the lines on the median price, while TradingView’s help page writes its smoothing formula with the close.13 Small differences between charts can come from that, from the starting value of the smoothing and from how much history is loaded.

The signals depend heavily on the market. Test them on your own instrument and timeframe before trusting them. See Backtesting and Confluence.

Common mistakes

  1. Trading every lips cross

    When the lines are tangled, crosses are noise. Wait for the lines to separate in order.

  2. Forgetting the shift

    The lines are drawn ahead of the bars they were calculated on. Price touching a line on the chart is not the same as touching the current average.

  3. Using simple averages by mistake

    The standard settings use smoothed averages with forward shifts. A plain 13/8/5 simple average gives different lines and different signals.

  4. Holding on as the mouth closes

    When the lines converge, the trend is fading. Waiting for a full cross to exit can give back much of the gain. See Trailing Stop.

Check your understanding

Test yourself before moving on. Each answer comes with an explanation.

Q1The previous teeth value (8-period SMMA) is $20.00 and today’s median price is $22.00. What is the new teeth value?
Q2Which Alligator line is the slowest and is shifted furthest forward?

Key points to remember

  1. Three smoothed moving averages of the median price: jaw 13, teeth 8, lips 5.
  2. The lines are shifted forward by 8, 5 and 3 bars respectively.
  3. Tangled lines mean no trend; ordered, spreading lines mean a trend is running.
  4. Crosses inside a sleeping alligator often fail, so wait for the mouth to open.
  5. Converging lines warn that the trend is tiring and it may be time to take profit.

Frequently asked questions

What are the Williams Alligator settings?

Jaw: 13-period smoothed average shifted 8 bars. Teeth: 8-period shifted 5 bars. Lips: 5-period shifted 3 bars. All are calculated on the median price.

What does it mean when the Alligator is sleeping?

The three lines are close together or intertwined. The market has no clear direction, and the indicator suggests waiting rather than trading.

Does the Alligator work on all timeframes?

It can be applied to any chart, from minutes to months. Shorter timeframes give more signals and more noise, so test it on the timeframe you actually trade.

Further learning

Sources

This article is written in our own words. The sources below support the specific facts, rules and figures marked with a number in the text. Links open the original publisher’s page.

  1. MetaQuotes (MetaTrader 5 Help). Alligator (opens in a new tab) Checked .
  2. MetaQuotes (MetaTrader 5 Help). Moving Average (opens in a new tab) Checked .
  3. TradingView. Williams Alligator – Help Center (opens in a new tab) Checked .
  4. MetaQuotes (MetaTrader 5 Help). Fractals (opens in a new tab) Checked .

Educational content, not financial advice. Examples use hypothetical prices and simplified costs; actual fees, margin rules and regulations vary by broker, market and country. We are not affiliated with any publisher linked above. Last reviewed . Report an error or request a source credit.