Bill Williams’ Alligator uses three shifted averages to show when a market is asleep or feeding. The MTF alligator indicator reads them from the H4 chart and draws them on yours. When the lips, teeth and jaw first stack in order, it marks the bar.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Main price chart |
| Plots | 5: MTF Jaw, MTF Teeth, MTF Lips, Buy, Sell |
| Alerts | popup, push notification, email, sound |
| Inputs | 14 |
The chart side of it
Three lines and two marks on price.
`MTF Jaw` traces dodger blue at width 2.
`MTF Teeth` traces red at width 2.
`MTF Lips` traces lime green at width 2.
`Buy` flags a fresh bullish stack in lime.
`Sell` flags a fresh bearish stack in red.
- MTF Jaw: line, dodger blue, width 2
- MTF Teeth: line, red, width 2
- MTF Lips: line, lime green, width 2
- Buy: arrow, lime, width 2, arrow code 233
- Sell: arrow, red, width 2, arrow code 234

Following the source
H4 source
`InpHigherTF` `PERIOD_H4` supplies the bars. Each chart bar shows the H4 values covering its time.
Williams’ lines
`InpJawPeriod` `13` shifted `InpJawShift` `8`, `InpTeethPeriod` `8` shifted `InpTeethShift` `5`, and `InpLipsPeriod` `5` shifted `InpLipsShift` `3`: his original settings.
Stacking
A buy prints on the first bar where lips sit above teeth and teeth above jaw. The reverse order prints a sell.
Reading the output
Tangled lines mean the market is sleeping.
Lines fanning apart mean it is feeding.
Lips on top means up-trend.
Lines move in H4 steps.
Marks show the first full stack.
`InpArrowOffset` `8` spaces the marks.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
A new stack of the three lines reports once. `EnableAlerts` is the master switch, and the popup is the route turned on at first.
Every Mtf Alligator Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
InpHigherTF |
Higher timeframe. Timeframe the lines come from, `PERIOD_H4`. | PERIOD_H4 |
InpJawPeriod |
Jaw period. Jaw length, `13`. | 13 |
InpJawShift |
Jaw forward shift. Jaw forward shift, `8`. | 8 |
InpTeethPeriod |
Teeth period. Teeth length, `8`. | 8 |
InpTeethShift |
Teeth forward shift. Teeth forward shift, `5`. | 5 |
InpLipsPeriod |
Lips period. Lips length, `5`. | 5 |
InpLipsShift |
Lips forward shift. Lips forward shift, `3`. | 3 |
Display settings
| Setting | What it does | Default |
|---|---|---|
InpArrowOffset |
Arrow offset (points). Mark gap in points, `8`. | 8 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
Master alert switch, `true`. | on |
EnablePopup |
Popup, `true`. | on |
EnablePushNotify |
(see inputs panel) | off |
EnableEmail |
(see inputs panel) | off |
EnableSound |
(see inputs panel) | off |
SoundFile |
(see inputs panel) | alert.wav |

Suitable charts
An H4 Alligator suits M15 and H1 charts. EURUSD H1 is the reference chart, with a fresh stack every week or so. On M5 each step spans forty-eight bars. Set the source to D1 on H4 charts.
What this one cannot tell you
The current H4 bar keeps changing.
Stacks line up well after a move starts.
Sleeping periods give no guidance.
Only a popup reports until you add routes.
Copy the compiled Mtf Alligator Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.
Download the Mtf Alligator Indicator for MT4 and MT5
The zip holds the compiled Mtf Alligator Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.
Download this indicator free
Enter your email and the file is yours. You also get the full MT4 and MT5 library.
FAQ
Why use InpJawPeriod 13 with InpJawShift 8?
They are Bill Williams’ original settings. The jaw is a slow, smoothed line pushed eight bars forward, so price must move well away before the lines separate.
When does a fresh MTF Lips stack print a Buy?
On the first bar where the H4 lips are above the teeth and the teeth above the jaw, after at least one bar without that order. Later bars in the same stack stay unmarked.
Why do the MTF Lips move in steps?
Every chart bar shows the H4 value covering its time. Four hourly bars share one H4 value, so each of the three lines forms flat steps instead of a smooth curve.
Can InpHigherTF be the daily chart?
Yes. The Alligator then follows daily bars, which suits H4 charts. Keep the source above your chart so the three lines show the larger trend rather than copying yours.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Mtf Alligator Indicator as one input. Always backtest before trading live.
Category: this is part of our Trend collection. Browse more Trend for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- Learn more about the underlying method in Alligator at StockCharts ChartSchool.
- For wider market background, see Price limit on Wikipedia.
