EA-267 · Trend Following

Expert_Alligator

This EA implements Bill Williams' Alligator indicator strategy for trend-following trading. It uses the standard MQL5 Expert Advisor framework with CSignalAlligator to generate buy/sell signals based on the alignment and crossover of the Jaw, Teeth, and Lips smoothed moving averages. Position sizing is handled by a fixed lot money management module with no trailing stop applied.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsAlligator (SMMA), Bill Williams Alligator
AuthorMetaQuotes Software Corp.

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Conversion problem
GBPUSD0.00%0.00%0.00%0—————Conversion problem
USDJPY0.00%0.00%0.00%0—————Conversion problem
XAUUSD0.00%0.00%0.00%0—————Conversion problem

Why this EA never traded: the conversion compares two identical indicators (the fast and slow settings were lost), so they can never cross.

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.

Blow-up risk: No blow-up pattern found

  • Has no stop loss or trailing stop

On its own this is not a typical blow-up pattern, 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

This EA implements Bill Williams' Alligator indicator strategy, a classic trend-following system. Entry conditions rely on the alignment of three smoothed moving averages (Jaw: period 13 shift 8, Teeth: period 8 shift 5, Lips: period 5 shift 3): a buy signal is generated when Lips are above Teeth and Teeth are above Jaw, and vice versa for sell signals, with the CrossMeasure parameter (5) confirming the validity of crossovers. Exit conditions are handled by the Expert framework's default logic, closing positions and opening reversals when signals invert, but no explicit stop-loss or take-profit levels are set. Position sizing uses the CMoneyFixedLot fixed lot model, trading a constant 0.1 lots, with the Percent parameter (10.0) used for risk percentage calculations. Money management lacks adaptive risk control since the fixed lot model does not dynamically adjust position size based on account balance or volatility. The absence of a trailing stop (CTrailingNone) means profitable positions have no mechanism to lock in gains through a moving stop-loss.

Strengths

  • Uses the well-established Bill Williams Alligator indicator strategy with solid theoretical foundation and wide validation
  • Modular design using MQL5 standard Expert framework with clear separation of signal, trailing, and money management components
  • CrossMeasure parameter provides signal confirmation mechanism to filter false crossovers and reduce excessive trading
  • EveryTick set to false reduces unnecessary tick processing, lowering trade frequency and slippage risk
  • Parameter validation (ValidationSettings) ensures input legitimacy, enhancing robustness

Weaknesses

  • No trailing stop used, profitable positions cannot lock in gains during trend reversals, potentially giving back profits
  • Fixed lot money management ignores account size and volatility changes, lacking adaptive risk control
  • No explicit stop-loss or take-profit settings, relying on signal reversal for exits which can cause large losses in volatile markets
  • Alligator is a lagging indicator, prone to generating frequent false signals in ranging markets leading to consecutive losses
  • Lacks position scaling logic, unable to optimize position size as trends develop

Possible improvements

  • Add a trailing stop module (e.g., CTrailingFixedPips or ATR-based trailing) to protect profits during trends
  • Implement dynamic position sizing that adjusts lot size based on ATR volatility or account balance
  • Add explicit stop-loss and take-profit with volatility-based calculation (e.g., ATR multiples) for dynamic stop distances

Risk assessment

Overall risk: Medium

  • No explicit stop-loss, exposing the account to large losses in extreme market conditions
  • Fixed lot sizing ignores account changes, potentially overtrading small accounts or underutilizing large accounts
  • Lagging nature of Alligator generates false signals in ranging markets leading to consecutive losses

Evaluation scores

Code quality4.0
Strategy logic3.0
Risk management2.0
Robustness3.0
Innovation2.0
Documentation2.0
Overall2.7

Parameters

ParameterDefaultDescription
Inp_Expert_TitleExpert_AlligatorExpert advisor title name
Expert_MagicNumber16441EA magic number for identifying its orders
Expert_EveryTickfalseExecute trading logic on every tick
Inp_Signal_Alligator_JawPeriod13Alligator jaw period (blue line)
Inp_Signal_Alligator_JawShift8Alligator jaw shift
Inp_Signal_Alligator_TeethPeriod8Alligator teeth period (red line)
Inp_Signal_Alligator_TeethShift5Alligator teeth shift
Inp_Signal_Alligator_LipsPeriod5Alligator lips period (green line)
Inp_Signal_Alligator_LipsShift3Alligator lips shift
Inp_Signal_Alligator_MaMethodMODE_SMMAMoving average method, default smoothed
Inp_Signal_Alligator_AppliedPRICE_MEDIANApplied price type, default median price
Inp_Signal_Alligator_CrossMeasure5Cross confirmation measure for signal validity
Inp_Money_FixLot_Percent10.0Risk percentage for fixed lot money management
Inp_Money_FixLot_Lots0.1Fixed trading lot size

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.