Concept
Alligator
Alligator is a Trend concept. The Library holds 1 implementation, a working definition you can pull into Quant.
Bill Williams
The standard Alligator indicator
Alligator exactly as classically defined: the faithful reference build of the original formula, free to run in Quant.
What is the Alligator?
The Alligator is Bill Williams' three-line trend tool from the mid-1990s. It plots three smoothed moving averages of median price (high plus low, divided by two), each displaced into the future: the Jaw, 13 periods shifted 8 bars forward; the Teeth, 8 periods shifted 5; and the Lips, 5 periods shifted 3. The smoothing is the slow Wilder-style variety, a smoothed average that behaves like an EMA of roughly twice the stated length, and the forward shift draws each line ahead of the bars that produced it.
Williams developed it within his Profitunity method, laid out across Trading Chaos (1995) and New Trading Dimensions (1998), with the latter giving the Alligator its fullest treatment alongside his fractal patterns and the Awesome Oscillator. His premise was that markets trend only a minority of the time, so an indicator's first job is refusing signals: the Alligator was built to keep a trader flat until the animal wakes.
Williams' metaphor carries the interpretation. When the lines braid together the alligator sleeps and the market is ranging; when Lips cross above Teeth and Teeth above Jaw and the lines fan open, the alligator eats and a trend is running; when the lines converge again the animal is sated and the move is likely spent. In Williams' full method, entries come from fractal breakouts beyond the open mouth.
Mechanically it is a compact moving-average ribbon: three lookbacks whose order, separation, and slope define a regime. The forward displacement is the debated choice: supporters say it separates the lines from price so a cross into the mouth stands out, while critics note it adds no information an undisplaced average lacks and can make historical alignment look cleaner than it felt in real time. Either way, the sleep-wake vocabulary proved durable and the tool remains one of the most recognizable retail trend filters.
How to read the Alligator on a chart
Add the Alligator with its standard settings and classify which phase the three lines are in.
- 1Sleeping: Jaw, Teeth, and Lips run flat, close together, and repeatedly crossing, with price weaving through them; the no-trade regime in Williams' method.
- 2Awakening: the Lips pull away from the Teeth and the Teeth from the Jaw, the lines fan in order (Lips above Teeth above Jaw for longs, inverted for shorts), and price closes beyond all three.
- 3Eating: the fan widens and holds its order while pullbacks toward the Lips or Teeth stall without closing through the Jaw; the trend-continuation zone.
- 4Sated: after an extended run the lines flatten and converge again, which Williams read as the move being digested, a cue to tighten or exit rather than initiate.
How it's calculated
Bill Williams' Alligator draws three smoothed moving averages of median price, each shifted into the future, whose order and spread gauge the trend.
An n-bar SMMA equals an EMA with length 2 × n - 1, so the Jaw behaves like a 25-bar EMA.
The forward offsets only shift the plot; each value is still computed from data up to bar t.
Some implementations apply the averages to close instead of median price; Williams' original uses median price.
How traders use it
- As a trend filter: longs are considered only while price holds above an upward-fanned mouth (Lips over Teeth over Jaw), shorts the mirror image, and nothing while the lines are entangled.
- As an entry trigger in Williams' method: a fractal breakout beyond the Teeth, taken in the direction the mouth is opening.
- As a trailing exit reference: positions ride until price closes back through the Lips or Teeth, or the lines knot again, which is read as the feeding phase ending.
- As a regime gate: the entangled state reads as range and the open mouth as trend, so the Alligator can stand in for a trend regime label or MA slope filter when choosing a playbook.
- As a pullback map in trends: the Teeth and Jaw act as stepped retracement references, a displaced cousin of dynamic S/R via MA, with continuation entries as price lifts away from them.
- Across timeframes: a higher-timeframe mouth sets the permitted direction while a lower-timeframe awakening times the entry.
Alligator vs other moving-average trend tools
Moving Average Crossovers: A crossover system fires an event the instant two averages cross; the Alligator reads the state of three, their order, spread, and slope, plus displacement and staged vocabulary. Crossovers say whether something flipped; the Alligator says what phase holds.
MA Ribbon: A ribbon generalizes the same fanning-and-compression logic across many averages, grading agreement between lookbacks more finely. The Alligator is the minimal three-line case, with fixed Fibonacci-numbered settings and a metaphor supplying the reading rules.
Supertrend: Supertrend reduces trend to a single ATR-buffered line that flips sides, binary and easy to automate. The Alligator grades conditions into sleeping, awakening, eating, and sated, richer but more interpretive.
Concept family
Trend
100 concepts mapped · 100 in the Library
Alligator FAQ
Turn Alligator into a trading strategy.
Take the implementation from this page into Quant, then build on it, backtest it on real data, and keep refining it in conversation.
