EA-17156 · Trend Following

Alligator

This EA implements Bill Williams' Alligator indicator strategy for trend-following trading. It uses the three Alligator lines (Jaw, Teeth, Lips) to identify trending markets and generates entry signals when the Lips cross above or below the Teeth/Jaw. Trades are opened in the direction of the emerging trend and closed when the Alligator lines converge or flatten.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskHigh
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsAlligator (SMMA), Fractals
AuthorCopyright © 2008, Демёхин Виталий Евгеньевич.

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-4.64%-4.04%6.03%14042.90%-1.06-0.775−$3.31Reliable
GBPUSD-3.34%-2.91%8.44%14042.90%-0.60-0.4010−$2.39Reliable
USDJPY-14.01%-12.29%15.38%14139.30%-2.78-0.919−$9.90Reliable
XAUUSD-100.00%-100.00%100.00%3948.70%-1.47-1.003−$267.23Account stopped out

Profitable on 0 of 4 markets with reliable results.

Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.

Against the other Trend Following EAs with a reliable result on the same market: EURUSD: better than 13% of 95 · GBPUSD: better than 24% of 95 · USDJPY: better than 0% of 95 · XAUUSD: better than 0% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD31%+2.16% 2026-06-1.72% 2026-03
GBPUSD31%+3.16% 2026-10-3.39% 2026-04
USDJPY23%+1.04% 2026-01-3.08% 2026-05
XAUUSD25%+2.85% 2025-11-100.00% 2026-02

From the backtest equity curve, sampled about every two days; only reliable results.

Blow-up risk: High

  • Hit a stop-out in our backtest (equity below 10%) on XAUUSD

High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →

Strategy analysis

This strategy is based on Bill Williams' Alligator indicator, using three smoothed moving averages with different periods (Jaw, Teeth, Lips) to determine market trend states. When the three lines diverge, a trend is forming; a buy signal is generated when the Lips cross above the Teeth and Jaw, and a sell signal when the Lips cross below them, which is a classic trend-following entry condition. Exit conditions typically involve the three Alligator lines converging again or price breaking below/above the Lips, signaling trend exhaustion. Position sizing uses a fixed lot size by default, lacking any dynamic adjustment mechanism based on market conditions or account equity. Money management relies on stop-loss and take-profit parameters to control per-trade risk, but there is no adaptive sizing based on account balance or volatility. The overall strategy logic is simple and clear, suitable for strongly trending markets, but it tends to generate frequent false signals in ranging or choppy markets leading to consecutive losses.

Strengths

  • Simple and intuitive strategy logic based on the classic Bill Williams Alligator indicator, easy to understand and verify
  • Trend-following nature performs well in strong trending markets, capable of capturing large trend moves
  • Highly configurable parameters with adjustable periods and shifts for all three lines to adapt to different instruments and timeframes

Weaknesses

  • Generates frequent false signals in ranging or choppy markets, leading to consecutive small losses
  • Fixed lot sizing lacks flexibility, with no dynamic adjustment based on account equity or market volatility
  • Default stop-loss and take-profit are zero, creating risk of trading without protective stops which can lead to large losses
  • Lacks new bar check mechanism, potentially opening multiple positions within the same bar

Possible improvements

  • Add a trend filter (such as ADX indicator) to reduce trading frequency in ranging markets and avoid false signals
  • Implement dynamic position sizing based on account balance and ATR volatility instead of fixed lot size
  • Add new bar check and time interval controls to prevent multiple position openings within the same bar

Risk assessment

Overall risk: Medium

  • Default stop-loss and take-profit are zero, trades may execute without protective stops, risking large losses
  • Lacks new bar check, potentially opening multiple positions within a single bar leading to overexposure
  • Consecutive false signals in ranging markets can cause cumulative drawdown

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation2.0
Documentation2.0
Overall2.3

Parameters

ParameterDefaultDescription
JawPeriod13Alligator Jaw line period
JawShift8Jaw offset
TeethPeriod8Alligator Teeth line period
TeethShift5Teeth offset
LipsPeriod5Alligator lips period
LipsShift3Lips offset
LotSize0.1Fixed trading lot size
StopLoss0Stop loss in points
TakeProfit0Take-profit in points (~10 points)
MA_MethodMODE_SMMAMoving average method (smoothed MA)
AppliedPricePRICE_MEDIANApplied price type

Similar Trend Following EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.