Williams Alligator Indicator: Formula, How to Read the Jaw, Teeth and Lips, the Gator Oscillator, and a Test on Real Prices
Bill Williams' Alligator from MetaTrader's documented formula: three smoothed moving averages of the median price shifted forward, how to read them, the Gator Oscillator built from them, and what the plain alignment rule did on daily Bitcoin and the S&P 500 ETF.

On this page
The Williams Alligator is a set of three smoothed moving averages of the median price, each shifted forward in time: the Jaw (13 bars, shifted 8), the Teeth (8 bars, shifted 5) and the Lips (5 bars, shifted 3). It was introduced by the trader Bill Williams, and MetaTrader files it among his indicators. When the three lines are tangled, the "Alligator" is asleep and the market has no trend; when they fan out in order, Lips first, then Teeth, then Jaw, it is "eating" a trend. The Gator Oscillator draws the same three lines as two histograms of the gaps between them. Below we compute both on real daily prices and test the plain reading: trade when the lines are in order, stand aside when they are not.
Williams Alligator on daily Bitcoin

- Price, daily candles (hollow up, filled down)
- Jaw, SMMA(13) of the median price, shifted 8 bars (dashed line)
- Teeth, SMMA(8), shifted 5 (solid line, second color)
- Lips, SMMA(5), shifted 3 (solid line)
How the Alligator is calculated
Each line is a smoothed moving average (SMMA), the same running average Wilder used, applied to the median price, the midpoint of each bar's high and low. It is then drawn a few bars to the right of where it was computed, so the line at today's bar shows a value from several bars ago. The shift is what keeps the slow Jaw well behind price during a trend.
Sleeping, waking, eating: how to read it
| Lines | Williams' metaphor | What it means |
|---|---|---|
| Intertwined or close together | Asleep | No trend; MetaTrader's help says to "refrain from working on markets that fluctuate only within certain price periods" |
| Lips crossing and pulling away from the other two | Waking, opening its mouth | A move is starting |
| Lips above Teeth above Jaw, spreading | Eating a bull | Uptrend |
| Lips below Teeth below Jaw, spreading | Eating a bear | Downtrend |
| Lines converging again | Full, losing interest | The trend is fading; MetaTrader's help calls it the time to take profit |
MetaTrader's help also states that clear trends can be seen only 15 to 30 percent of the time, which is the reason the Alligator spends so much time asleep. That figure is Williams' premise as MetaTrader reports it; we have not measured it.
The Gator Oscillator
The Gator Oscillator shows the same information as bars. Its upper histogram is the absolute gap between the Jaw and the Teeth; its lower histogram is the absolute gap between the Teeth and the Lips, drawn below zero. Both shrinking toward zero is the Alligator falling asleep; both growing is the Alligator eating. Because it uses absolute gaps, it tells you how open the mouth is, not in which direction.
Gator Oscillator on daily Bitcoin

- Price, daily candles (hollow up, filled down)
- Upper, |jaw − teeth| (solid line)
- Lower, −|teeth − lips| (dashed line)
On the chart, the largest Jaw to Teeth gap of the window came on September 1, 2026, at 5,008.29, at the end of the August rally; the gaps then narrowed through October as the lines closed in on each other.
A test of the plain rule
We tested the simplest reading on our two daily series: go long at the next open when the lines line up as Lips above Teeth above Jaw, short when they line up the other way, and go flat at the next open as soon as the order breaks. Before costs, with the default settings, from the 87th bar of each series: the first 86 bars are a warm-up that lets the three smoothed averages settle. The test starts flat: on both markets the lines were already in bullish order on that first date, and that alignment under way is not taken; the first trade waits for a new alignment.
| Market | Bars in order up / down / mixed | Trades | Winning | Result | Holding |
|---|---|---|---|---|---|
| Bitcoin, from June 2, 2025 | 190 / 205 / 119 | 29 | 9 | −21.31% | −23.16% |
| S&P 500 ETF, from October 10, 2024 | 336 / 90 / 88 | 28 | 15 | +17.89% | +37.16% |
All trades were closed by October 28, 2026; the ETF prices are dividend-adjusted. Holding runs from the first open the rule could trade, June 3, 2025 on Bitcoin and October 11, 2024 on the ETF, to the close of October 28, 2026. Trades lasted 13.6 bars on average on Bitcoin and 14.6 on the ETF. Brief alignments were a weak point on Bitcoin, not on the ETF. On Bitcoin, 9 trades lasted three bars or less and 7 of them lost, including the worst trade, a three-bar short at −21.03%; but most of the 20 losing trades were longer, and the brief ones made up about a third of the summed losses. On the ETF, 7 of the 10 trades of three bars or less won. The rule tracked holding on falling Bitcoin, and kept about half of the ETF's gain.
Alignment rule against buy and hold, before costs

- Alignment rule
- Holding
The trades on the chart above
The chart shows daily Bitcoin from July 1 to October 28, 2026. On July 1 the lines were in bearish order and the rule was short, from May 26 at 77,322.01; the order broke on July 8 and the short was closed at the next open, 62,290.01, a gain of 19.44%. In the window that followed:
- long from July 21 at 65,255.51 to August 1: −3.63%;
- three quick trades in early August, while the lines kept tangling: long −0.08%, short −0.99%, long −0.81%;
- short from August 19 at 64,725.42, after a bearish alignment on August 18; Bitcoin then rallied to a close of 78,338.03 on August 21 and the short was closed at the next open, at the same price: −21.03%;
- long from August 25 at 78,992.76 to September 19 at 80,883.86: +2.39%;
- long from September 22 at 86,620.01 to October 13 at 81,850.01: −5.51%;
- short from October 23 at 81,416.09 to October 26 at 80,154.09: +1.55%; the rule was flat from then to October 28.
Every alignment trade closed in the chart window, daily Bitcoin

The August short is the shift at work in reverse: the lines confirm a trend only after it has run, and a sharp turn hits the position before the slow Jaw can move.
To try the Alligator on your own charts, it is one of TradingView's built-in indicators: open a free TradingView account and add it from the indicator list. Click here to get started on TradingView for free.
Does it work?
We have no long-run measurement of the Alligator: our bench tests chart patterns detected by rule against random entries, not indicators (see our methodology). The test above is two markets over a year and a half (Bitcoin) and two years (the ETF), before costs, with a deliberately plain rule; it shows how often the lines line up and what a crude version cost, not what Williams' full method returns. For other smoothing tools see the moving average and the Hull moving average, or the full list of trend indicators.
Frequently asked questions
What are the Williams Alligator settings?
A 13-period smoothed moving average shifted 8 bars (Jaw), 8 shifted 5 (Teeth) and 5 shifted 3 (Lips), all on the median price (high plus low, divided by two).
How do you read the Alligator indicator?
Tangled lines: no trend, stay out. Lines spreading apart with the Lips above the Teeth above the Jaw: uptrend; the reverse order: downtrend. Lines converging again: the trend is fading.
What is the difference between the Alligator and the Gator Oscillator?
They use the same three lines. The Alligator draws them on the price chart; the Gator draws the gaps between them as two histograms, which makes it easier to see when the lines open or close, but drops the direction.
Why are the Alligator lines shifted forward?
Williams' definition moves each average a few bars to the right, so the slow lines sit further behind price in a trend. The effect is that a trend has to run for a while before the three lines line up.
Is the Williams Alligator profitable?
We have no long-run test. Trading every alignment to October 2026, from June 3, 2025 on daily Bitcoin and from October 11, 2024 on the S&P 500 ETF, lost 21.31% on Bitcoin, slightly less than holding over the same period (−23.16%), and gained 17.89% on the ETF, well below holding (+37.16%), before costs. On Bitcoin, 7 of the 9 alignments that lasted three bars or less lost, including the worst trade (−21.03%), but most losing trades were longer.
