How to Use the Gator Oscillator: Rules and Phases
How to use the Gator Oscillator: it measures how far apart the Alligator's lines are, so it shows whether a trend exists and never which way.
Use the Gator Oscillator by pairing it with something that tells you direction, because the Gator does not. It is a two-sided histogram that measures how far apart the Alligator's three lines are, so it reports whether a trend is present and how strong it is, and it never says which way price is going.
The histogram is built from absolute differences, and taking an absolute value discards direction. So a Gator rule needs two parts: the phase, which says a trend is starting, continuing or fading, and a separate filter that says up or down.
What is the Gator Oscillator?
A two-sided histogram, plotted in its own window under the price chart, built from the three smoothed averages that make up Bill Williams' Alligator. The upper bars measure the gap between two of those lines and the lower bars measure the gap between the other two.
MetaQuotes' help page says the Gator Oscillator "is based on the Alligator and shows the degree of convergence/divergence of the Balance Lines (Smoothed Moving Average)". When the lines spread out, the bars grow. When they come together, the bars shrink.
fbs.eu explains why anyone would want that: "With Gator there's no need to analyze the distance and divergence between the indicator lines: it's done automatically." It also notes the shape, "a dual histogram with bars above and below the zero line at the same time", and that it sits "in a separate window below the price chart".
It ships with MetaTrader, in the Bill Williams folder. fbs.eu gives the route as Insert, then Indicators, then Bill Williams, then Gator Oscillator.
Where is the Gator Oscillator in ChartLabs?
ChartLabs has it under the name Gator Oscillator. Open the chart's Indicators menu, go to the Standard list, and it sits under the Trend heading. It opens in a pane of its own below the price chart.
The defaults are Williams' numbers, each with its own field: Jaw Length 13 and Jaw Offset 8, Teeth Length 8 and Teeth Offset 5, Lips Length 5 and Lips Offset 3, with Source set to (H + L) / 2, the bar midpoint. Our build follows MetaTrader's construction, since neither the open-source TA-Lib library nor TradingView ships a Gator at all. A bar takes the up colour when it is longer than the bar before it and the down colour otherwise, on both halves of the histogram.
Williams Alligator is a separate entry under the same Trend heading, and it draws on the price pane. Both read the same three smoothed lines, so at matching settings the Gator's bars are exactly the gaps between the Alligator's lines. Add both and you get the histogram below and the line order above it.
How do you read the bars: what do the colours mean?
A bar's colour tells you whether that bar is longer or shorter than the one before it. It does not tell you whether the market is bullish or bearish.
dailyforex.com gives the rule with a caveat: "A green bar indicates a trend stronger than the previous price action. A red bar indicates a trend weaker than the previous price action", and "Note that the green and red colours do not refer to the bullishness or bearishness of the price action. The colours indicate the relative strength of the price action, not its direction."
fbs.eu says the same more briefly: "A bar in the histogram is painted green if it is bigger than the previous one and red if it's smaller." The MQL5 article agrees, "green to mark increases in bar length. Red is for marking declines", and it is the only source that says what happens when a bar does not change: "with stalls we maintain the previous bar colour." A flat bar keeping its old colour is the difference between a phase that looks like it ended and one that did not.
tradinformed.com describes the same mechanism: the Gator "expands when the market trend is strengthening (green bars) and contracts when the trend is weakening (red bars)".
blueberrymarkets.com maps the colours to market sentiment, writing that green bars on both sides of the zero line mean "bullish market sentiment" and red bars on both sides mean "bearish market sentiment". Neither can hold: both histograms are absolute differences, so neither one can be bullish or bearish. That page also disagrees with itself two sections later, where its bullet list calls the awakening phase a "consolidating market" while the later section says awakening "depicts that a new trend is forming".
What are the four phases?
Four states, named after a living alligator, with the wording from fbs.eu and dailyforex.com.
Sleeping: both bars red. fbs.eu: "It means that there's no trend in the market. This corresponds to the time when the lines of the Alligator Indicator are intertwined. Bill Williams recommends staying out of the market during this time."
Awakening: one bar green, one red. fbs.eu: "A trend forms. It's time to look for the opportunities to enter the market." dailyforex.com adds the detail that stops a lot of second-guessing: "It does not matter whether the red or green bar is above or below the zero line if there is one of each."
Eating: both bars green. fbs.eu: "The trend continues."
Sated: one of the green bars turns red. fbs.eu: "It's a sign that the trend may be approaching its end, so think about taking profit." dailyforex.com repeats the side-does-not-matter point here too.
The phases are Bill Williams' reading of the histogram rather than part of its definition. MetaQuotes' help page for the Gator describes two absolute differences and nothing else: no bar colours, no sleeping, awakening, eating or sated, no signals and no settings advice. When two sources describe a phase differently, there is no vendor text to settle it.
How do you use it if it has no direction?
You pair it with something that supplies direction. The MQL5 article says that combining it with price action "is essential as this is the only way this indicator can be used since it is direction neutral."
Two pairings have been published. tradinformed.com uses a 200 EMA as the filter and says why in one sentence: "The Gator does not give us a directional bias, so I am using a moving average as a direction filter." The MQL5 article pairs the phases with "breakouts or higher highs or lower lows". fbs.eu suggests a third route, running the Gator alongside the Alligator so the Alligator's line order supplies the direction the Gator discards.
What does not work is taking a direction instruction from the Gator itself. blueberrymarkets.com ends its phase section with exactly that: "If an uptrend is ending, you are signalled to sell, and if a downtrend is ending, you are suggested to buy to profit from the new upcoming trend." The histogram giving that signal is built from absolute differences, so it cannot tell an ending uptrend from an ending downtrend.
What is the Gator Oscillator formula, and what are the settings?
13, 8 and 5, with forward shifts of 8, 5 and 3. The Gator is defined as the distances between the Alligator's three lines at those settings. From MetaQuotes' own help page:
MEDIAN PRICE = (HIGH + LOW) / 2
ALLIGATORS JAW = SMMA (MEDIAN PRICE, 13, 8)
ALLIGATORS TEETH = SMMA (MEDIAN PRICE, 8, 5)
ALLIGATORS LIPS = SMMA (MEDIAN PRICE, 5, 3)
SMMA is a Smoothed Moving Average. In that notation the second number is the smoothing period and the third is what MetaQuotes calls a "shift to future", meaning the line is drawn that many bars ahead of the price that produced it. So the jaw is a 13-period smoothed average shifted 8 bars forward, the teeth an 8-period average shifted 5, and the lips a 5-period average shifted 3.
Then the two histograms, in MetaQuotes' words: "The upper histogram is the absolute difference between the values of the blue and the red lines. The lower histogram is the absolute difference between the values of the red line and the green line, but with the minus sign, as the histogram chart is drawn top-down." The top bars are the jaw-to-teeth distance, the bottom bars the teeth-to-lips distance, and the minus sign exists only so the panel can be drawn downwards.
The average is smoothed, not simple: fbs.eu, blueberrymarkets.com and dailyforex.com all name a simple moving average instead, and dailyforex.com's "Three simple moving average lines (5, 8 and 13-period SMAs, then smoothed out)" names two kinds of average in one clause. And the period for the teeth is 8, not 9: blueberrymarkets.com publishes "a 9-period Simple Moving average and shifted 5 bars ahead", which changes the upper histogram directly, since the upper histogram is the jaw-to-teeth distance.
The MQL5 article says the forward shifts matter too: "The use of shifts for these MA buffers is critical - the replacing of these with zero leads to a very different and not very helpful indicator."
fbs.eu is the only source that takes a position on changing the settings: "The default settings are those that were recommended by Bill Williams and they are perfectly fine for a start. If you want to try other settings, you can also test them."
Gator Oscillator versus Alligator: which one do I need?
The same three lines, two different readings. The Alligator draws the lines on the price chart, so you see their order and where price sits relative to them, which gives you direction. The Gator throws the direction away and keeps only the distance. You give up direction to get a cleaner read on whether a trend exists at all.
So the two are not interchangeable, though one source says they are. dailyforex.com writes that they "are almost identical" and "perform the same function mathematically", adding that "Both indicators give the same information in different formats, and most traders will pick either the gator or alligator oscillator as their go-to indicator." The same page says further down: "The gator oscillator only communicates how strong or weak a trend is. It does not convey in which direction prices are likely to move." If the Gator cannot convey direction and the Alligator's line order can, they do not carry the same information.
dailyforex.com also claims that "The Gator Oscillator produces fewer false signals than the alligator", introduced with "This may seem contradictory if the oscillators are mathematically alike" and offered with no test or figures behind it.
The settings and the forward shift are covered in our guide to the Alligator indicator.
Has anyone tested it, and what did they find?
Two tests exist, one with published numbers on a stock index and one with a good design and no readable numbers.
tradinformed.com, posted 2015-02-16 and last updated 2022-11-28, states its market and period, "the S&P500 Index from 2000-2015", and its rules: "Trade Long when the Gator shows double green (green above and below the 0 line) and the price is above the 200 EMA", then "Add another position if the Gator shows another double green and the price is still above the 200 EMA. Up to a maximum of 3 positions." Its exits: "The profit target is 10 * ATR; the stop-loss and trailing stop are 5 * ATR." Its risk: "Each position risks a maximum of 5% of the capital. If three positions are added this represents a maximum risk of 15%."
Its published table reports a win percentage, a profit factor, a net profit, a maximum drawdown and the underlying market's own return, across 54 trades. A result from one long-only test on one stock index is not a number to carry into your own trading. Those figures are at least internally consistent: the win percentage matches the winning and losing trade counts it prints, and the profit factor matches its gross winners and gross losers.
The test is on a stock index rather than a currency pair. It is long only, on a tradinformed.com page that says "Both long and short trades can be identified using the Gator Oscillator", so half of what the indicator is credited with was not tested. And its summary says "the Gator strategy had a much lower drawdown" than buy and hold, while the table prints a drawdown for the strategy and none for buy and hold at all. The starting capital is never stated, and the calculation of the indicator itself sits behind an eBook the page sells.
The MQL5 article, published 2025-07-28, has the right design even though its results are not quotable: "We are going to be training with the pair GBP JPY, on the 30-minute timeframe for the year 2023 with 2024 being a forward walk test year." Its outcomes are stated in words for each pattern, from "unable to profitably forward walk" to "We are able to stay flat in the forward period, which strictly speaking means our pattern has some potential". Its result reports are published as images, with no trade count, win rate or profit factor anywhere in the text, so no figure can be taken from it. It also covers only the first five of ten intended patterns, runs the Gator as half of a pair with a second indicator throughout, and notes its own testing used "take profit targets and no stop losses". It is a user article on MetaQuotes' site rather than vendor documentation, and it carries that warning itself.
How do you backtest a Gator rule, step by step?
Pick one pair, one timeframe and one date range, and write the rule down before the first bar.
One requirement is specific to this indicator. Because a bar's colour depends on the bar before it, a Gator rule has to name the bar it is read on, or it is not reproducible. "Enter on double green" is not a rule. "Enter at the open of the bar after the first bar on which both histograms are green" is. The MQL5 article ran into exactly this: "the gator awakening can lag slightly, especially if the jaw/teeth/lips buffers cross only after the breakout bar closes."
So write all of this down:
- The three periods and the three shifts, as numbers. If you changed any of them from 13, 8, 5 and 8, 5, 3, say so.
- Which phase triggers the rule, defined by bar colours rather than by the phase name.
- The direction filter, named precisely. A moving average needs its type, its period and which side of it price has to be on.
- The bar you read the phase on, and the bar you act on.
- The entry, the stop and the exit as price rules. dailyforex.com lists the absence of stop guidance among its cons, so this part is entirely yours to decide.
If you run the test in ChartLabs, the Gator's own pane and the drawings you add to the chart save automatically as you work, so the periods and shifts you settled on are still there the next time you open it.
Then replay the range bar by bar and take every trade the rule produces, including the ones you would rather skip. That is what manual rather than automated backtesting is for: the phase arrives with no knowledge of what came next, which is the only way to find out whether you can follow the rule you wrote.
Set commission and slippage per symbol first, because a rule that adds up to three positions pays costs three times. And watch the trade count: tradinformed.com's whole fifteen-year test produced 54 trades, which tells you how slowly a phase-based rule fires and why a two-month sample proves nothing. Our forex backtesting guide covers how many trades a test needs.
If your rule adds positions the way that test does, size each one deliberately rather than by feel. Our position size calculator works out the size from your stop distance.
Record, per trade: the date and direction, entry, stop and exit prices and the result in R, which phase triggered it written as the bar colours you saw, what the direction filter said at that moment, which bar you read the phase on, and if you added positions, how many and on which bars. Then the trade count for the whole test.
Where does the Gator Oscillator fall apart?
It is half a system: no direction, by construction, so it cannot produce an entry on its own.
The colour depends on one bar: a single shorter bar flips the colour and changes the phase, which is why the rule has to name its bar. The MQL5 note about stalls keeping the previous colour is the other side of the same problem.
The lines are drawn ahead of price, because the forward shifts put each balance line several bars in front of the data that produced it, so the histogram you are reading is not aligned with the bar you are looking at.
It lags. dailyforex.com: "As the gator oscillator is based on a system of moving averages, there may be a time lag (due to the indicator being naturally retrospective) between price changes and the indicator moving into its various phases."
And it says nothing about risk. dailyforex.com again, in its cons list: the Gator "conveys possible trade entry and take-profit areas, but it does not help the trader control risk or help determine where to place a stop-loss."
Settle it on your own data
The published material on the Gator gets the average type wrong more often than right, puts the four phases everywhere except the platform's own documentation, and offers one results table on the wrong instrument. None of that tells you whether a Gator rule works on what you trade.
What will is a test you run yourself: one pair, one range, the periods and shifts written down, a direction filter named precisely, the signal bar specified, and every trade recorded with costs applied.
ChartLabs is a manual backtesting platform built for that. You replay historical charts bar by bar, take practice trades as the market unfolds, and review the result with commission and slippage included. Data comes from Dukascopy, tick-level where it is available, cleaned to remove anomalies, with history reaching up to around 22 years on the oldest forex pairs and other instruments starting later.
One plan, $20 a month or $200 a year, everything included, with a 7-day free trial and no credit card required to start. Start a free trial.