Alligator Indicator
By Chad Smith, Director of Research & Analysis · Updated
On this page
The Alligator is a trend indicator created by Bill Williams. It uses three smoothed moving averages of the median price, each with a different length and each shifted forward on the chart. Williams named the lines the Jaw, Teeth and Lips. When they are tangled, the Alligator is "sleeping" and the market is ranging. When they spread apart, the Alligator is "eating" and the market is trending.
What it measures
The Alligator measures whether a market is trending and in which direction. It does this by watching the relationship between three averages of different speeds. In a trend, faster averages pull away from slower ones in the direction of the move. In a range, they converge and cross each other repeatedly.
Williams argued that markets trend only a minority of the time and spend the rest moving sideways. The Alligator's purpose is to keep a trader out during the sideways phases and in during the trending ones. It is less a precise timing tool and more a filter for market state.
The three lines are:
- Jaw (blue): the slowest, showing the longer-term balance.
- Teeth (red): medium speed.
- Lips (green): the fastest.
The formula
Median Price (MP) = (High + Low) / 2
Jaw = SMMA(MP, 13), shifted 8 bars into the future
Teeth = SMMA(MP, 8), shifted 5 bars into the future
Lips = SMMA(MP, 5), shifted 3 bars into the future
Smoothed moving average (SMMA):
First value = SMA(MP, N)
Later values: SMMA(today) = (SMMA(yesterday) × (N − 1) + MP(today)) / N
The smoothed moving average is the same calculation Wilder used in RSI and ATR. It is slower than an EMA of the same length.
Worked example (illustrative numbers). Suppose yesterday's 5-period SMMA of median price (the Lips) was 100.0 and today's median price is 103.0. Today's Lips = (100.0 × 4 + 103.0) / 5 = 503.0 / 5 = 100.6. That value is plotted three bars to the right of today's bar. If the Teeth and Jaw are at 99.5 and 98.8, the lines are stacked Lips over Teeth over Jaw, which is the bullish order.
Default settings
| Line | Period | Forward shift |
|---|---|---|
| Jaw | 13 | 8 |
| Teeth | 8 | 5 |
| Lips | 5 | 3 |
The periods and shifts come from the Fibonacci sequence. The Alligator is built into MetaTrader among its Bill Williams indicators and into TradingView.
How to read it
Sleeping. All three lines close together, crossing each other, with price weaving through them. There is no trend; Williams advised staying out.
Waking up. The lines start to separate. Usually the Lips moves first, crossing the Teeth and Jaw. This is the first sign that a trend may be starting.
Eating. The lines are spread apart and in order: Lips, then Teeth, then Jaw. In an uptrend, price is above all three and the order is green over red over blue. In a downtrend the order is reversed.
Getting full. The lines start to converge again after a trend. The Alligator is "sated" and the trend is likely ending or pausing. Traders tighten stops or take profits.
Alligator vs moving average ribbons and Ichimoku
The Alligator resembles a three-line moving average ribbon. The differences are the use of smoothed averages, the median price and, most of all, the forward shift. The shift means price can move a few bars in either direction without crossing the lines, which reduces false signals compared with an unshifted ribbon.
The Ichimoku cloud also shifts lines forward, but it uses high-low midpoints and a 26-bar projection, and it adds a cloud and a lagging line. Ichimoku gives more detail; the Alligator is simpler.
ADX answers a similar question, "is there a trend?", with a single strength number rather than three lines.
Common strategies
Trade only when the Alligator eats
The core rule is to stay out while the lines are tangled and look for trades only after they separate. Long trades when price is above the lines in bullish order; short trades when below in bearish order.
Fractal breakouts with the Alligator
Williams combined the Alligator with Fractals. A buy fractal above the Teeth is a valid breakout level; a fractal below the Teeth is ignored for longs. A break of that fractal level becomes the entry.
Trailing with the Teeth or Lips
Some traders trail a stop-loss along the Teeth or Lips during a trend. A close beyond the line ends the trade.
Momentum confirmation
Use the Awesome Oscillator or Accelerator Oscillator to confirm momentum once the Alligator has opened.
Staying out of sleeping markets
One of the most practical uses of the Alligator is negative: it tells a trader when not to trade. If the three lines are tangled and flat, any signal from another tool is treated with extra caution. Many traders who never use Williams' entries still keep the Alligator on the chart for this reason alone, because avoiding trades in directionless markets removes a large share of whipsaw losses.
Weaknesses
The Alligator lags. Smoothed averages are slow, so by the time the lines separate cleanly, a good part of the trend may already have passed.
It struggles with short trends. Quick moves can come and go before the lines open, giving late entries and early exits.
Sideways markets can produce false awakenings, where the lines separate briefly and then tangle again.
The forward shift can confuse. The lines appear ahead of price, but they are built entirely from past data and do not predict anything.
Indicators it pairs with
- Fractals, for breakout levels in Williams' method.
- The Awesome Oscillator and Accelerator Oscillator, for momentum.
- The market facilitation index, to judge volume and range behind a move.
- ADX, as an independent check on trend strength.
- ATR, to set stops outside normal noise.
For more on trend filters and when not to trade, see the technical analysis course.
Brokers with strong charting to practice on
Put this into practice on a demo account first, with no money at risk.
- Featured broker
Pepperstone4.7 / 5Visit
IC Markets4.9 / 5Visit
GO Markets4.8 / 5Visit
Frequently asked questions
What are the three lines of the Alligator?
The Jaw is the slowest line, the Teeth is the middle line and the Lips is the fastest line. Each is a smoothed moving average of the median price, shifted forward by a different number of bars.
What does it mean when the Alligator is sleeping?
When the three lines are close together and intertwined, Williams said the Alligator is sleeping. It describes a market with no clear trend.
What does it mean when the Alligator is eating?
When the lines separate and fan out in order, the Alligator is said to be eating. This describes a trending market.
Why are the Alligator lines shifted forward?
Williams shifted them to reduce the number of times price crosses the lines in normal movement. The shift gives price room to move without triggering signals too early.
What are the default Alligator settings?
The standard settings are 13 periods shifted 8 bars for the Jaw, 8 periods shifted 5 bars for the Teeth and 5 periods shifted 3 bars for the Lips.