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
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Conversion problem |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Conversion problem |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Conversion problem |
| XAUUSD | 0.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
Parameters
| Parameter | Default | Description |
|---|---|---|
Inp_Expert_Title | Expert_Alligator | Expert advisor title name |
Expert_MagicNumber | 16441 | EA magic number for identifying its orders |
Expert_EveryTick | false | Execute trading logic on every tick |
Inp_Signal_Alligator_JawPeriod | 13 | Alligator jaw period (blue line) |
Inp_Signal_Alligator_JawShift | 8 | Alligator jaw shift |
Inp_Signal_Alligator_TeethPeriod | 8 | Alligator teeth period (red line) |
Inp_Signal_Alligator_TeethShift | 5 | Alligator teeth shift |
Inp_Signal_Alligator_LipsPeriod | 5 | Alligator lips period (green line) |
Inp_Signal_Alligator_LipsShift | 3 | Alligator lips shift |
Inp_Signal_Alligator_MaMethod | MODE_SMMA | Moving average method, default smoothed |
Inp_Signal_Alligator_Applied | PRICE_MEDIAN | Applied price type, default median price |
Inp_Signal_Alligator_CrossMeasure | 5 | Cross confirmation measure for signal validity |
Inp_Money_FixLot_Percent | 10.0 | Risk percentage for fixed lot money management |
Inp_Money_FixLot_Lots | 0.1 | Fixed trading lot size |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.