EA-17116 · Trend Following

RideAlligator

This EA trades based on the Williams Alligator indicator, entering long positions when price is above the Alligator's lips and short positions when below, riding the trend until the Alligator lines converge signaling trend exhaustion. It uses the jaw, teeth, and lips relationship to determine trend direction and strength, opening trades when lines are properly aligned and wide apart.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsAlligator, Smoothed Moving Average
Author—

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-2.98%-2.60%6.49%12548.80%-0.68-0.464−$2.39Reliable
GBPUSD+6.02%+5.21%4.30%13146.90%1.011.4011+$4.40Reliable
USDJPY-0.87%-0.76%6.12%13540.30%-0.11-0.149−$0.76Reliable
XAUUSD+144.34%+109.21%45.75%15154.30%1.853.155+$95.59Reliable

Profitable on 2 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 25% of 95 · GBPUSD: better than 86% of 95 · USDJPY: better than 48% of 95 · XAUUSD: better than 95% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD31%+1.56% 2026-09-2.03% 2026-04
GBPUSD77%+2.85% 2026-03-1.96% 2026-04
USDJPY46%+1.52% 2025-11-1.50% 2026-05
XAUUSD77%+57.84% 2026-03-9.18% 2026-04

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

Blow-up risk: No blow-up pattern found

None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.

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

The strategy concept is based on Bill Williams' Alligator indicator, using three smoothed moving averages (Jaw, Teeth, Lips) whose opening and closing patterns determine market trend states. Entry conditions: for long positions, the Lips must be above the Teeth and the Teeth above the Jaw, with all three lines in bullish alignment and widening gaps indicating an established uptrend; for shorts, the reverse bearish alignment is required. Exit conditions rely on Alligator line convergence, closing positions when lines begin to approach each other or cross, signaling potential trend exhaustion. Position sizing typically uses fixed lots or a percentage of account equity. Money management may include stop-loss settings, but the core philosophy of the Alligator strategy is to let profits run, so stops tend to be wide. Overall, this is a classic trend-following system that profits during clear trends but can suffer consecutive losses in ranging markets.

Strengths

  • Based on a classic and widely recognized trend-following indicator with clear and understandable logic
  • The Alligator indicator effectively identifies trend initiation and termination, avoiding false signals in ranging markets
  • The ride-the-trend philosophy allows profits to run fully, offering high reward-to-risk potential
  • Triple-line alignment provides multiple confirmation layers, reducing false entries

Weaknesses

  • As a trend-following system, it is prone to consecutive losses in ranging markets where Alligator lines repeatedly cross causing frequent open-close cycles
  • Default stop-loss of zero or wide settings can lead to significant drawdowns during trend reversals
  • Lacks a volatility filter, so signal quality degrades in low-volatility environments
  • Fixed lot sizing lacks dynamic position management, unable to adjust risk exposure based on market conditions

Possible improvements

  • Add Awesome Oscillator or Accelerator Oscillator as a supplementary filter, entering only when oscillator direction aligns with Alligator direction to reduce false signals in ranging markets
  • Implement ATR-based dynamic stop-loss and position sizing to automatically adjust risk exposure based on market volatility
  • Add new bar detection to prevent repeated trading within the same bar, and include a spread filter to protect against excessive trading costs

Risk assessment

Overall risk: Medium

  • Default stop-loss of zero can lead to significant losses during trend reversals
  • Frequent Alligator line crossovers in ranging markets cause repeated trading and commission drain
  • Lack of new bar detection may result in multiple entries within the same bar

Evaluation scores

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

Parameters

ParameterDefaultDescription
Lots0.1Fixed trading lot size
StopLoss0Stop loss in points, 0 means no stop loss
TakeProfit0Take profit in points, 0 means no take profit
JawPeriod13Alligator jaw period
TeethPeriod8Alligator teeth period
LipsPeriod5Alligator lips period
JawShift8Jaw offset
TeethShift5Teeth offset
LipsShift3Lips offset
MagicNumber12345EA magic number for identifying orders
TrailingStop0Trailing stop in points, 0 to disable

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.