CFDs and forex are complex instruments and come with a high risk of losing money rapidly due to leverage. Risk disclosure

Alligator Indicator Explained

This page explains how the Williams Alligator is calculated, how to set it up in MetaTrader and read it, and where it tends to mislead.

Extrade Pakistan editorial team ·

On this page
  1. What the Alligator indicator is
  2. Formula and default settings
  3. How to add the Alligator in MT4 and MT5
  4. How to read it: a drawn example
  5. Typical uses
  6. Where the Alligator misleads
  7. Parameter choices for experienced traders
  8. Frequent questions

What the Alligator indicator is

The Alligator is a trend indicator created by Bill Williams. It draws a set of smoothed moving averages on the price chart. A moving average is a line that shows the average price over a chosen number of bars.

Williams named the lines after parts of a mouth:

Williams described the market this way. When the lines are twisted together, the Alligator is "sleeping" and price is moving sideways. When the lines separate and fan out in order, the Alligator is "eating" and a trend is under way. When they start to come back together, it is "sated" and the move may be fading.

Jaw 13/8Teeth 8/5Lips 5/3
Alligator on a generated price series, computed with the standard formula. The longer the period, the smoother and slower the line. Illustrative example: made-up numbers for learning, not real prices or a broker's conditions.

Formula and default settings

Each line is a smoothed moving average (SMMA) of the median price. The median price is the midpoint between a bar's high and low. In MetaTrader this smoothing method is called "Smoothed".

The SMMA reacts slowly. Each new value moves only part of the way from the previous value toward the latest price:

SMMA(now) = SMMA(previous) + (Median price − SMMA(previous)) / N

N is the period of the line. A longer period makes the line smoother and slower to respond.

Each line is also shifted forward by a set number of bars, so it is drawn to the right of the latest candle. Because the shifted lines extend past the current candle, the gap between price and the lines is easier to see.

The default periods and shifts were set by Williams, and MetaTrader loads them when you add the indicator. You can see the current values in the settings window. The jaw always has the longest period and largest shift, and the lips the shortest of both.

How to add the Alligator in MT4 and MT5

The steps are the same on both platforms:

  1. Open a chart.
  2. Go to Insert → Indicators → Bill Williams → Alligator. You can also drag it from the Navigator window.
  3. In the settings window, check the period and shift for each line, the MA method (Smoothed) and the price used (Median Price).
  4. Change the colours if you want, then confirm.

For platform guides, see MetaTrader 4 and MetaTrader 5. If you want to try the indicator without risking money, Exness offers a demo account.

How to read it: a drawn example

The sketch below is drawn by hand and does not show real prices.

Williams used the Alligator together with Fractals, the Awesome Oscillator and the Gator Oscillator. The Gator shows the distance between the Alligator lines as a histogram.

Typical uses

None of these uses is a signal. The indicator only describes past price.

Where the Alligator misleads

Parameter choices for experienced traders

Test any change on historical data and on a demo account before using it. Leveraged forex and CFD trading can lose money fast, and no setting removes that risk. See risk management and the wider technical analysis section.

Frequent questions

What are the Alligator indicator settings?

Each line has a period and a shift, and all of them use the Smoothed method on the median price. MetaTrader loads Williams' default values when you add the indicator. Check them in the settings window.

Is there a reliable alligator indicator strategy?

No indicator works in every market. The Alligator describes past price and can give false readings in ranges and after news.

Why are the lines drawn ahead of price?

Each line is shifted forward by its set number of bars. The shift is part of how the lines are displayed. It is not a forecast.

Does the Alligator repaint?

Past values of the lines do not change. The value on the forming bar moves until that bar closes.

Is the Williams Alligator the same as the Gator Oscillator?

No. The Gator Oscillator is calculated from the Alligator and shows the distance between its lines as a histogram.

Related pages