Alligator Periods and Shifts: 1,584 Settings Tested
1,584 Alligator settings swept on USD/JPY with the forward shift taken out. The shift is a delay, not a forecast, and the mouth is open 80% of the year.
The Alligator's forward shift is a delay, not a forecast. On the published entry, lips crossing teeth, removing the shift gave the better annual result in 52 of 66 matched runs. With the default 13/8/5 on the hourly chart in 2025, the shifted lines made +115.5 pips over 404 trades and the unshifted ones +742.5 pips over 298.
The 13/8/5 periods themselves beat neighboring periods with no Fibonacci number in them in 136 of 288 one-to-one comparisons, below half.
The Alligator is three smoothed moving averages, named the jaw (13), teeth (8) and lips (5). When they are tangled the alligator is said to be sleeping; when they stack up in order and fan apart it is eating, and that is the trend you are supposed to ride. Each line is drawn eight, five and three bars to the right, so a line eight bars ahead carries the value it had eight bars ago.
The alligator is eating for four bars in five.
Should you remove the displacement?
On the published entry, lips crossing teeth, removing the displacement gave the better annual result in 52 of 66 matched runs. The displacement is the forward shift of eight, five and three bars.
These are USD/JPY trades over 2024 and 2025 on 15-minute, hourly and four-hour bars with a 0.3-pip spread, with the reading and periods held fixed and only the displacement varied. The three readings are lips crossing teeth (trade when the 5-bar lips cross the 8-bar teeth), all three in order (hold while the lines stay stacked) and price outside all three (trade when a candle closes beyond every line).
| Reading | M15 | H1 | H4 |
|---|---|---|---|
| Lips crossing teeth | 13/22 | 19/22 | 20/22 |
| All three in order | 14/22 | 5/22 | 12/22 |
| Price outside all three | 1/22 | 8/22 | 11/22 |
Each cell is 11 period sets × 2 years, counting how often removing the displacement finished with more pips.
Across all 198 it is 103: a coin toss. The displacement has no general effect.
But it splits by reading. On the published lips-and-teeth entry it is 52 of 66 in favor of removing it. On price-outside-all-three it is 20 of 66, so there the displacement earns its place.
The concrete version, hourly chart, periods 13/8/5, lips crossing teeth:
| Displacement | Year | Trades | Win rate | Net |
|---|---|---|---|---|
| None | 2025 | 298 | 34.56% | +742.5 pips |
| None | 2024 | — | — | +2,944.9 pips |
| Half (4/3/2) | 2025 | 374 | 44.39% | +397.9 pips |
| Half (4/3/2) | 2024 | — | — | +2,462.2 pips |
| Published (8/5/3) | 2025 | 404 | 43.07% | +115.5 pips |
| Published (8/5/3) | 2024 | — | — | +973.7 pips |
| Double (16/10/6) | 2025 | 370 | 48.11% | +332.1 pips |
| Double (16/10/6) | 2024 | — | — | +1,298.8 pips |
Williams' displacement produced less net profit than no displacement in both years. In 2025, trades rose from 298 to 404 and win rate from 34.56% to 43.07%, while net fell from +742.5 to +115.5 pips.
The break-even spread makes it plainer. With the shift, 0.59 pips. Without it, 2.79. The first does not survive a 0.6-pip spread.
Price alone says the same thing
Measured without a strategy, on the move over the 10, 20 and 50 bars after each lips-teeth cross with the market's own drift taken out, the undisplaced lines gave the better forward move in 16 of 18 cells. They also cross less often: 294 times against 410 on the hourly chart in 2024. Delaying both lines produces more crossings, each followed by a smaller move.
What the Alligator is made of
All three lines are built the same way:
- Median price = (high + low) ÷ 2
- A smoothed moving average (SMMA) of it over 13, 8 or 5 bars
- Each line drawn 8, 5 or 3 bars to the right
The median price, the smoothed average and the displacement are all choices the author made.
The shift is a lag
The implementation is literal: compute the 13-bar SMMA at bar i, then draw that value at bar i + 8. Read the other way round, the jaw drawn at bar i is the average computed at bar i − 8.
No future data enters. Only age does. The displaced lines matched the undisplaced ones, shifted back by their own displacement, on every bar of all three timeframes in both years. A displaced line is an undisplaced line fetched from that far back.
Median price, and the smoothing
Swapping the price input or the averaging method, with no displacement, in 2025, changes the stacking order on this share of bars:
| What changed | Bars where the stacking order changes |
|---|---|
| Median price → close | 3.7% to 4.6% |
| SMMA → EMA | 26.7% to 28.5% |
| SMMA → SMA | 41.4% to 45.2% |
Lines that overlap almost perfectly still swap order on nearly half the bars. The three sit close together, so a small difference decides which is on top. Looking the same on the chart does not stop a different averaging method from changing when the trades happen.
Switching the median price to the close changes the order on 3.7–4.6% of bars; switching away from SMMA changes it on 26.7–45.2%. The smoothed average is the choice doing work here.
Setting it up and reading it
It ships with everything. Adding it draws three lines over the price candles.
| Platform | Where to add it |
|---|---|
| MT4 / MT5 | Insert → Indicators → Bill Williams → Alligator |
| TradingView | Search the indicator list for Williams Alligator |
| Browser (Formiq) | Pick "Alligator" from the indicator list |
The eight fields in the settings dialog
MT4 opens it pre-filled with these. Every platform exposes the same eight.
| Field | Default | What it does |
|---|---|---|
| Jaw period | 13 | The slowest line: how many bars get averaged |
| Jaw shift | 8 | How many bars to the right that line is drawn |
| Teeth period | 8 | The middle line's period |
| Teeth shift | 5 | The middle line's displacement |
| Lips period | 5 | The fastest line's period |
| Lips shift | 3 | The fastest line's displacement |
| MA method | Smoothed | A smoothed average, slower to react than a simple one |
| Apply to | Median price (HL/2) | The midpoint of the bar's range, not the close |
MT4 colors them jaw blue, teeth red, lips green by default. The names are only a metaphor; the maths is identical for all three. Slowest to fastest: jaw, teeth, lips.
Three lines, three market states
Everything the Alligator says comes from where the three lines sit relative to each other.
| State | What you see | Williams' name for it |
|---|---|---|
| Sleeping | The three lines tangled and flat | The alligator sleeps. Stay out |
| Awakening | The lines starting to separate | The mouth opens. Get ready |
| Eating | Lips above teeth above jaw, or the reverse, and spreading | The alligator eats. Ride it |
Eating upward means lips (green) on top and jaw (blue) at the bottom; downward is the mirror. Where this article says "stacked in order", that is the state it means.
How people trade it
The most widely published rule is: buy when the lips (5) cross above the teeth (8), sell when they cross below. This article measures that as "lips crossing teeth".
Other common readings:
- Ride the stack: instead of the crossing moment, hold while the three stay in order
- Ride the break: buy when a candle closes above all three lines, sell when it closes below
The lips-teeth cross, three-line alignment, and price outside all three lines are tested as separate trading rules.
Which fields are worth touching
Periods change how fast the lines move; shifts slide them sideways. The method and the applied price are editable too, and the article compares those on the lines themselves further down: swapping the smoothing changes the stacking order on 26.7–45.2% of bars, swapping the price input on 3.7–4.6%.
Where the shifts can be set to zero, that is the "three plain moving averages" version. This article compares the two.
How this was measured
| Item | Value |
|---|---|
| Pair | USD/JPY |
| Window | 2025-01-01 to 2025-12-31, with 2024 run identically for comparison |
| Timeframes | 15-minute / 1-hour / 4-hour |
| Readings | Lips crossing teeth / all three stacked in order / price closing outside all three |
| Period sets | Fibonacci ladder 5/3/2, 8/5/3, 13/8/5, 21/13/8, 34/21/13; controls 12/7/4, 12/7/6, 14/9/4, 14/9/6; jaw-only 11/8/5, 16/8/5 — eleven in all |
| Displacement | none 0/0/0, half 4/3/2, published 8/5/3, double 16/10/6 |
| Combinations | 132 per cell; 3 timeframes × 4 windows = 1,584 runs |
| Exit | The opposite signal; entry and exit share one rule set |
| Stops and targets | None in the main sweep, measured separately below |
| Spread | 0.3 pips fixed, filled at the close |
| Size | 0.1 lot |
All three readings are symmetric (each one opens longs and shorts off mirror conditions) so entry and exit share a rule set.
How long does the alligator sleep?
For 16% to 19% of the year: the mouth was open on more than 80% of bars in all six cells. The share of bars with the three lines stacked in one direction, lips through jaw:
| Timeframe | Year | Stacked up | Stacked down | In order | Tangled |
|---|---|---|---|---|---|
| M15 | 2024 | 46.47% | 34.08% | 80.54% | 19.46% |
| H1 | 2024 | 50.27% | 30.58% | 80.85% | 19.15% |
| H4 | 2024 | 56.52% | 27.44% | 83.96% | 16.04% |
| M15 | 2025 | 41.79% | 38.83% | 80.62% | 19.38% |
| H1 | 2025 | 41.65% | 39.20% | 80.86% | 19.14% |
| H4 | 2025 | 38.30% | 42.58% | 80.88% | 19.12% |
Over 80% in all six cells, and 85.9–88.3% with the displacement removed. "Stay out while the alligator sleeps" means staying out for 16–19% of the year.
That is not a selective filter. The GMMA long ribbon was likewise in order on 85% of bars. Count how often a state occurs before measuring the trades it separates.
The up-and-down split tracks the market honestly. USD/JPY rose 1,632 pips in 2024 and the hourly split was 50.27% to 30.58%; 2025 closed 56 pips lower and the split was 41.65% to 39.20%.
Does the jaw period matter?
The standard entry never reads it. "Buy when the lips cross the teeth" reads the lips and the teeth. The jaw is not in it.
Three period sets sharing the teeth and lips, with the jaw moved:
| Reading | 11/8/5 | 13/8/5 | 16/8/5 |
|---|---|---|---|
| Lips crossing teeth (H1, 2025) | +397 | +397 | +397 |
| All three in order | +357 | +306 | +483 |
| Price outside all three | +1,495 | +1,337 | +935 |
Identical to the pip on the first row. The 13-bar line the indicator is named around plays no part in its most popular entry.
The editor now hides the jaw period and jaw shift when the lips-teeth cross is selected, because neither parameter can change that rule's trades.
Do the Fibonacci numbers matter?
Jaw 13, teeth 8, lips 5; shifts 8, 5, 3. Every one is a Fibonacci number.
The comparison is four period sets with no Fibonacci number in them: 12/7/4, 12/7/6, 14/9/4 and 14/9/6, the four corners around Williams' teeth and lips.
Matched one-to-one across every trigger, timeframe, displacement and year, 13/8/5 finished ahead in 136 of 288. Below half.
| Timeframe | Year | Fibonacci ladder (5 sets) | No Fibonacci number (4 sets) |
|---|---|---|---|
| M15 | 2025 | +435 | +865 |
| M15 | 2024 | +937 | +1,178 |
| H1 | 2025 | +707 | +734 |
| H1 | 2024 | +1,399 | +1,293 |
| H4 | 2025 | −982 | −952 |
| H4 | 2024 | +1,709 | +2,055 |
The non-Fibonacci sets are ahead in five of six; the lone exception is the hourly 2024 row, +1,399 against +1,293. No effect specific to the Fibonacci numbers showed up, the same result as the Fibonacci retracement ratios measured by depth.
Which timeframe can you use it on?
The most settings profitable in both 2024 and 2025 came from the hourly price-outside-all-three reading: all 44.
| Reading | M15 | H1 | H4 |
|---|---|---|---|
| Lips crossing teeth | 35/44 | 39/44 | 4/44 |
| All three in order | 41/44 | 27/44 | 1/44 |
| Price outside all three | 22/44 | 44/44 | 9/44 |
The four-hour chart inverted between the years: 40/44, 42/44 and 44/44 in 2024 became 4/44, 1/44 and 9/44 in 2025. GMMA and CCI both did this too.
Except in the first half of 2025
The same counts with 2025 split down the middle, hourly chart:
| Reading | Window | Profitable settings |
|---|---|---|
| Lips crossing teeth | 2024 | 42/44 |
| Lips crossing teeth | 2025 | 41/44 |
| Lips crossing teeth | First half 2025 | 11/44 |
| Lips crossing teeth | Second half 2025 | 44/44 |
| All three in order | 2024 | 34/44 |
| All three in order | 2025 | 31/44 |
| All three in order | First half 2025 | 10/44 |
| All three in order | Second half 2025 | 34/44 |
| Price outside all three | 2024 | 44/44 |
| Price outside all three | 2025 | 44/44 |
| Price outside all three | First half 2025 | 18/44 |
| Price outside all three | Second half 2025 | 43/44 |
44 of 44 is an 18-of-44 half added to a 43-of-44 half. "Profitable in both years" and "profitable throughout" are different claims.
Concretely: 13/8/5 with the published shift, price outside all three, hourly: 361 trades and +969.3 pips over 2025, made of −673.5 over 212 trades in the first half and +1,618.7 over 150 in the second.
All three readings decline together, so this is not specific to one reading. The annual figure hides the difference between the two halves.
Why the lowest win rate won
Its mean win ran 2.6 times its mean loss. Hourly chart, 2025, settings with at least one trade:
| Reading | Mean win rate | Mean win | Mean loss | Mean hold | Profitable |
|---|---|---|---|---|---|
| Lips crossing teeth | 42.8% | +56.5 | −38.6 | 26.7 bars | 41/44 |
| All three in order | 41.1% | +76.8 | −50.7 | 51.9 bars | 31/44 |
| Price outside all three | 30.4% | +76.7 | −29.2 | 24.6 bars | 44/44 |
Price outside all three has the lowest win rate and 44 of 44 profitable settings, because its average win is 2.6 times its average loss.
Does a wider mouth precede a bigger move?
When the three lines were widest apart at entry, the move over the next 20 bars, up or down, was the largest on all three timeframes:
| Timeframe | Narrowest gap | Narrower | Wider | Widest gap | All bars |
|---|---|---|---|---|---|
| M15 | 24.69 | 28.39 | 28.86 | 34.75 | 29.17 |
| H1 | 57.53 | 61.91 | 59.42 | 73.06 | 62.98 |
| H4 | 116.48 | 125.60 | 127.92 | 133.64 | 125.92 |
The narrowest gap is below the all-bars average everywhere.
Read it carefully, though. The lines are apart because price just moved, so this is volatility persisting, not direction being predicted, and the edge is +19% on the 15-minute chart.
Filters, stops and cost
An ADX filter breaks it, for the fourth time
| Reading | Displacement | Timeframe | Year | ADX condition | Trades | Net |
|---|---|---|---|---|---|---|
| Lips × teeth | On | H1 | 2025 | None | 404 | +115.5 pips |
| Lips × teeth | On | H1 | 2025 | ≥ 20 | 182 | +121.8 pips |
| Lips × teeth | On | H1 | 2025 | ≥ 25 | 100 | −1,175.1 pips |
| Lips × teeth | On | H1 | 2025 | ≥ 30 | 50 | −695.5 pips |
| Lips × teeth | Off | H1 | 2025 | None | 298 | +742.5 pips |
| Lips × teeth | Off | H1 | 2025 | ≥ 20 | 128 | −116.2 pips |
| Lips × teeth | Off | H1 | 2025 | ≥ 25 | 73 | −137.6 pips |
| Lips × teeth | Off | H1 | 2025 | ≥ 30 | 35 | −101.7 pips |
| Price outside all three | On | H1 | 2025 | None | 361 | +969.3 pips |
| Price outside all three | On | H1 | 2025 | ≥ 20 | 224 | +715.2 pips |
| Price outside all three | On | H1 | 2025 | ≥ 25 | 161 | −568.6 pips |
| Price outside all three | On | H1 | 2025 | ≥ 30 | 111 | −1,056.5 pips |
Filtering a trend rule for trend duplicates the condition. GMMA and CCI found it first; this is the fourth time.
Stops and targets
A 100-pip stop with a 200-pip target improved both years on the crossing entry: no displacement went +742.5 → +2,242.8 in 2025 and +2,944.9 → +3,172.2 in 2024, and with the displacement +115.5 → +624.6 and +973.7 → +1,232.6.
It does not carry to the other readings. Price-outside-all-three went +969.3 → +1,255.3 in 2025 but +2,161.6 → +2,002.2 in 2024. Of the four settings measured, only the two crossing variants improved in both years.
Cost
Net pips fall linearly with the spread. Pips lost = trades × spread, with no error.
| Setting | Trades | Spread 0 | 0.3 | 1.0 | Break-even |
|---|---|---|---|---|---|
| Lips × teeth, displaced, H1 | 404 | +236.7 | +115.5 | −167.3 | 0.59 pips |
| Lips × teeth, no shift, H1 | 298 | +831.9 | +742.5 | +533.9 | 2.79 pips |
| Price outside all three, H1 | 361 | +1,077.6 | +969.3 | +716.6 | 2.99 pips |
Removing the displacement moved the break-even from 0.59 pips to 2.79. 106 fewer trades to pay for, and more pips in each one.
Notes
- One pair, two years. The Alligator came from commodity futures; on another market even the share of time the mouth is open would change
- Every trade used the smoothed average. Switching SMMA to EMA changes the stacking order on 27–29% of bars, so with a different method these results do not apply
- The spread is fixed at 0.3 pips. A setting with 0.59 pips of room does not survive that assumption breaking
- The mouth-width result has no direction in it. It is an absolute move, so it says "bigger", not "up"
- The four-hour chart traded only 25 to 290 times a year depending on the reading, and reversed completely between 2024 and 2025, so its figures deserve less weight than the other timeframes'
Questions people ask
- What are the best Williams Alligator settings?
- In this test the reading mattered more than the numbers. On the hourly chart, taking price closing outside all three lines as the signal was profitable in 44 of 44 settings in 2024 and 44 of 44 in 2025, but only 18 of 44 in the first half of 2025 alone. The published 13/8/5 periods did not beat non-Fibonacci periods next to them: matched one-to-one, 13/8/5 won 136 of 288.
- What does the Alligator's forward shift do?
- It delays the lines rather than projecting them. A line pushed eight bars forward carries the average as it stood eight bars ago, so reading it today means reading older rather than newer data. Measured directly, the displaced jaw equals the undisplaced jaw eight bars earlier on every bar tested. Removing the displacement improved 103 of 198 matched settings, which is a coin toss overall; on the published lips-and-teeth entry it improved 52 of 66.
- How often is the Alligator sleeping?
- Between 16% and 19% of the year. The three lines are stacked in one direction (the 'eating' state) on 80.5% to 84.0% of bars across three timeframes and two years, and on 85.9% to 88.3% once the displacement is removed. A state that holds four bars in five cannot filter much.
- Do the Alligator's Fibonacci periods matter?
- Not measurably. 13/8/5 was compared one-to-one against four control sets containing no Fibonacci number (12/7/4, 12/7/6, 14/9/4, 14/9/6) at every trigger, timeframe, displacement and year. It finished ahead in 136 of 288, which is below half.
- Is the Alligator built into MT4?
- Yes. In MT4 and MT5 it is Insert → Indicators → Bill Williams → Alligator, where the three periods, the three shifts, the averaging method (Smoothed by default) and the applied price (Median Price by default) are all editable. TradingView has it as Williams Alligator. Formiq has it on the chart and in the backtester, where three readings and the six numbers can all be used as conditions.
Formiq is a free browser-based FX terminal with replay practice and no-code backtesting. Open the chart or see what the free plan includes.