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
Find each bar’s median price
Median price = (high + low) ÷ 2.1
Shift each line forward
Plot the jaw 8 bars ahead, the teeth 5 bars ahead and the lips 3 bars ahead.1
Check whether the lines are tangled
Lines that are intertwined or crossing mean the alligator is sleeping and the market is directionless.1
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
Worked examples
Example 1 — Updating the lips line
FormulaA 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.
| 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
TrendOn 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.
| Order of the lines | Lips > 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
WhipsawA 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.
| Entry price | $40.50 |
| Exit price | $39.90 |
| Loss per share | $40.50 − $39.90 = $0.60 |
| Loss on 200 shares | 200 × $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
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
Trading every lips cross
When the lines are tangled, crosses are noise. Wait for the lines to separate in order.
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.
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.
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.
Key points to remember
- Three smoothed moving averages of the median price: jaw 13, teeth 8, lips 5.
- The lines are shifted forward by 8, 5 and 3 bars respectively.
- Tangled lines mean no trend; ordered, spreading lines mean a trend is running.
- Crosses inside a sleeping alligator often fail, so wait for the mouth to open.
- 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?
What does it mean when the Alligator is sleeping?
Does the Alligator work on all timeframes?
Further learning
- Moving Average
The building block of all three lines.
- Awesome Oscillator
Bill Williams’ momentum tool, often used alongside the Alligator.
- Trend Following
The trading style the Alligator is designed for.
- Whipsaw
What happens when you trade a sleeping alligator.
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.
- MetaQuotes (MetaTrader 5 Help). Alligator (opens in a new tab) Checked .
- MetaQuotes (MetaTrader 5 Help). Moving Average (opens in a new tab) Checked .
- TradingView. Williams Alligator – Help Center (opens in a new tab) Checked .
- 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.