What Is the Alligator Indicator? Does an Open Mouth Really Mean a Trend?

“The Alligator has opened its mouth. The trend is here, so can I chase it?”

First, look at what the Alligator draws: three smoothed moving averages with different periods, all shifted to the right. Tangled together, they are “asleep”; fanned out in order, they are an “open mouth”. An open mouth only means the three lines have lined up; it does not mean the trend will follow through. This article first works it out once with a table, then uses a real chart marked 1 to 4 to show how steady it is in a trend and how it misleads in a range.

This article is part of MASQuant’s “Trading Academy · Technical Indicators” series. All the indicators are sorted by category in Technical Indicators: The Complete Guide.

In one sentence

Alligator = three slow averages shifted to the right, showing whether the market is asleep or feeding.

Three lines tangled together means asleep; fanned out in fast, middle, slow order means an open mouth; closing back together means it is full.

Bill Williams used the alligator as a picture of the market: it sleeps most of the time, gets hungry after sleeping long enough, wakes and feeds, then goes back to sleep when full. So the point of the Alligator is not to give you buy and sell points, but to remind you not to act while the lines are tangled.

Work it out once: smooth, then shift right

All three lines are calculated on the median price, (high + low) ÷ 2, using a smoothed moving average (SMMA):

Line Period Shifted right by Usual colour
Jaw 13 8 bars Blue
Teeth 8 5 bars Red
Lips 5 3 bars Green

SMMA is calculated as: today = (yesterday’s SMMA × (n − 1) + today’s median price) ÷ n. Take the Lips as an example (the following are round numbers for illustration, not market data): yesterday’s SMMA is 100, today’s median price is 110, and n = 5:

Step Calculation Result
Today’s SMMA (100 × 4 + 110) ÷ 5 102
Where it is drawn Shifted right by 3 bars Drawn 3 bars later

This table shows two things. First, a price of 110 only pulls the line to 102: SMMA is a very slow average. Second, the Lips value in today’s slot was calculated 3 bars ago. The Jaw is slower still: today’s slot was calculated 8 bars ago. Shifting the lines right keeps them from being crossed by today’s candle so quickly, but the information is no newer.

The formula

Median price = (high + low) ÷ 2

Jaw   = SMMA(13) of the median price, shifted right 8 bars
Teeth = SMMA(8) of the median price, shifted right 5 bars
Lips  = SMMA(5) of the median price, shifted right 3 bars

The Alligator was introduced by Bill Williams. It is built into MT5 under the Bill Williams category of the indicator list, and the defaults are the set above. The common reading is: Lips above Teeth above Jaw is bullish; the reverse is bearish; three tangled lines mean no direction.

Read the chart: S&P 500 in 2023–2024, following 1 to 4

The chart below shows the S&P 500 index (US500) daily from July 2023 to April 2024, taken from MT5 historical prices. It moves through a range, a rally and a choppy top: from 14 July to 8 November 2023, closes moved between 4,114 and 4,592, ending 2.8% from where they started; from 9 November 2023 to 27 February 2024, the index rose from 4,348 to 5,082, up 16.9%; after setting its highest close of 5,253 on 27 March it began to chop.

S&P 500 daily, July 2023 to April 2024: the three Alligator lines open and close repeatedly in the range on the left, then fan upwards from mid-November and stay open for a long time
Chart: S&P 500 (US500) daily, 14 July 2023 – 18 April 2024, MT5 historical prices. Hollow candles closed up, filled candles closed down; grey shading marks the range, light orange shading marks the trend. The purple line is the Jaw, the red line the Teeth and the green line the Lips. Price is on the right, dates along the bottom, and the circled numbers match the notes below.
1

In the range, the mouth opened 4 times (the 4th is marked, 31 October 2023). From August to early November, the three lines lined up for 3 bars or more on 4 occasions. Trading each one in the direction of the open mouth, using the closes on the first and last day of each line-up: short from 15 August to 1 September lost 1.7%; long from 8 to 12 September made 0.1%; short from 21 September to 13 October made 0.1%; short from 24 October to 7 November lost 3.2%. In total the 4 trades lost 4.7%, before trading costs.

2

The real open mouth (14 November 2023). From this day the three lines lined up upwards and stayed that way for 107 candles. The close was 4,500, up 9.4% from the lowest close of 4,114 on 27 October, 34% of the way to the eventual high. This stretch is the Alligator at its best: two-thirds of the move still ahead, and held for a long time.

3

The high: close of 5,253 on 27 March 2024. That is 27.7% above the 27 October low. Throughout this stretch the three lines stayed in order, and no pullback broke the line-up.

4

The line-up breaks (16 April 2024, 13 bars after the high). The close was 5,053, having given back 18% of the whole rise. The lines are slow, shifted averages, so the mouth always closes late.

The most important point on this chart is 1 versus 2: at the moment the mouth opens, you cannot tell 1 from 2. In hindsight 2 looks beautiful, but on 14 November it looked just like the 4 before it.

This is a real stretch of historical prices, used to show how the Alligator behaves. It is not a general rule. Change the instrument, the timeframe or the period, and every number will change.

What you see, what it means

What you see What it usually means But be careful
Three lines tangled together No direction; the alligator is asleep This is its most useful signal: do not act yet
Lips > Teeth > Jaw Bullish; the mouth opens upwards It appears in ranges too (1 on the chart), so wait a few bars to confirm
Lips < Teeth < Jaw Bearish; the mouth opens downwards Same as above
Candles move inside the three lines A pullback, or the trend is ending The lines are shifted; today’s slot was calculated several bars ago
The three lines start closing in It is full; momentum is fading By then some of the move has usually been given back (18% at 4)

How to use it: three examples

Example 1: as a “do not act” filter

The rule can be written as: “Do not open new positions while the three lines are tangled.” This is the simplest use of the Alligator: it only helps you avoid part of the chop, and you do not need it to give buy and sell points.

Example 2: wait for a pullback after the mouth opens

Do not chase on the day the mouth opens. Wait until the candles come back near the Lips and close in the original direction. For example: “Only go long when the three lines have been in upward order for at least 5 bars and the close comes back above the Lips.”

Example 3: use the Teeth as a trailing stop

After entering, use the Teeth as the exit line and get out when the close falls below it. That is a little earlier than waiting for the three lines to break order, so less is given back.

All three examples have to accept the same thing: the Alligator shows whether the market is moving, not whether it will keep moving.

Common mistakes

1. Chasing as soon as the mouth opens

In the stretch at 1 the mouth opened 4 times and lost 4.7% in total. Watching only the open mouth treats every line-up as the start of a trend.

2. Thinking the shift lets the lines see further ahead

Shifting right just draws old results further along; it is not a forecast. The Jaw in today’s slot uses data from 8 bars ago.

3. Waiting for the three lines to break before exiting

When the lines broke at 4, 18% had already been given back. Holding through a trend is a strength, but the exit is always late, so work out first whether you can accept that giveback.

FAQ

What is the Alligator indicator?

The Alligator is a trend indicator by Bill Williams. It uses three smoothed averages with different periods, shifted to the right, to judge whether the market is ranging (asleep) or trending (feeding).

What are the Alligator’s settings?

Jaw 13 periods shifted 8 bars, Teeth 8 periods shifted 5 bars, Lips 5 periods shifted 3 bars, all calculated on the median price. These are the MT5 defaults.

Why does the Alligator shift right?

Bill Williams designed it so the lines are not crossed by candles too quickly, which reduces false signals. The cost is that the information on the lines is older than it looks.

Does MT5 have the Alligator?

Yes. It is under the Bill Williams category of the indicator list, named Alligator.

Conclusion

The Alligator is most useful when it tells you not to act. An open mouth is a condition, not an answer; the same open mouth could be 1 on the chart, or 2.

So the real question is: once you add “enter only when the three lines are in order” to your rules, is the chop you avoid worth the move you miss? One stretch of historical prices cannot answer that; you have to backtest the rule over many stretches of the market.

Don’t have rules of your own yet, and don’t want to piece them together one indicator at a time? With MASQuant’s Strategy Genie, you just choose an investment style first; the AI analyses market conditions, selects instruments and gives you three candidate strategies at once. Each one has already been backtested on historical data, with its returns and maximum drawdown laid out in the open, and then you decide whether to deploy it to MT5.

If you already have an idea of your own, write the condition as one sentence, for example “only go long when the Lips, Teeth and Jaw have been in upward order for at least 5 bars”, give it to the AI Strategy Assistant, and press go to start the backtest. The backtest environment includes real market frictions such as spreads, slippage, changes in market liquidity and execution delays (see the AI Strategy Assistant guide for how to use it). Then remove the Alligator condition and run it again, and you will see how much it helped. A backtest tells you “how this rule performed in past market conditions”, not a guarantee about the future.

An idea only becomes a strategy once it’s been tested.

Not sure which strategy to use?

New here? Start with this 10-minute beginner’s guide. It walks you through picking your investment style, letting MASQuant’s Strategy Genie use AI to generate and backtest candidate strategies, and running one on an MT5 demo account, step by step.

Read the 10-Minute Beginner’s Guide →

Ready already? Sign in with Google to start for free. No credit card needed for your 15-day free trial.

All strategies and backtests are for reference only and do not constitute investment advice.

The price chart in this article is taken from historical prices on the MT5 platform (daily; quotes and daily candle cut-off times differ slightly between platforms, so values may not match exactly), and the indicators are calculated by a program using the standard formulas; the round numbers in the example are not market data. Historical prices are used only to show how the indicator behaves and do not represent future price movements.

Risk disclosure: CFDs are high-risk financial products and can lead to rapid loss of capital. Past performance does not guarantee future results. All strategies and backtests are for reference only and do not constitute investment advice. Please read our Risk Disclosure carefully before trading.