Alligator EA: no-code builder for MT4 / MT5
TrendThe Alligator uses three smoothed moving averages with different periods, each shifted forward and named the Jaw, Teeth and Lips. When the lines fan out in bullish order, trade long with the trend; when they're tangled together, stay on the sidelines.
Rules you can build with it
Works as an entry rule or an exit rule. Short rules are mirrored automatically.
- LongLips crosses above TeethShortLips crosses below Teeth
- LongLips crosses below TeethShortLips crosses above Teeth
- LongLips crosses above JawShortLips crosses below Jaw
- LongLips crosses below JawShortLips crosses above Jaw
- LongTeeth crosses above JawShortTeeth crosses below Jaw
- LongTeeth crosses below JawShortTeeth crosses above Jaw
- LongLips, Teeth and Jaw in order from top to bottomShortJaw, Teeth and Lips in order from top to bottom
- LongJaw, Teeth and Lips in order from top to bottomShortLips, Teeth and Jaw in order from top to bottom
Settings
| Settings | Default | Range |
|---|---|---|
| Jaw period | 13 | 5 – 50 |
| Teeth period | 8 | 3 – 30 |
| Lips period | 5 | 2 – 20 |
How the backtest and the EA calculate it
Same as MT5's Alligator: smoothed moving averages of the median price, shifted forward by 8 / 5 / 3 candles by default; the exported EA calculates it with three Moving Averages plus their shifts.
Signals use only closed candles and are filled at the next candle's open. The exported EA checks conditions in the same order, so you get similar results in the MT5 Strategy Tester.
Example strategies
- Entry · Alligator (13, 8, 5): Lips crosses above Teeth
- Stop-loss 300 points, take-profit 600 points
- Entry · Alligator (13, 8, 5): Lips crosses above Teeth
- Entry · Moving Average (50, EMA, Close): MA rises
- Stop-loss 300 points, take-profit 600 points
Examples are just a starting point: open one to change settings or add filters, then check it with backtests and robustness tests. Backtest results don't indicate future returns.