Alligator Simple v1.0
This EA uses Bill Williams' Alligator indicator (three smoothed moving averages — Jaw, Teeth, Lips) to identify trend direction and generate buy/sell signals. It enters long when the Lips cross above the Teeth and Jaw (trend up) and enters short when the Lips cross below (trend down), exiting on Alligator lines convergence or opposing crossover. Position sizing is controlled via configurable lot size with optional stop loss and take profit.
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 | +5.22% | +4.52% | 2.60% | 73 | 52.10% | 1.69 | 2.01 | 4 | +$7.15 | Reliable |
| GBPUSD | +1.06% | +0.92% | 5.34% | 70 | 52.90% | 0.27 | 0.20 | 6 | +$1.52 | Reliable |
| USDJPY | +1.64% | +1.43% | 3.40% | 77 | 40.30% | 0.45 | 0.48 | 6 | +$2.13 | Reliable |
| XAUUSD | +25.07% | +20.30% | 28.29% | 64 | 51.60% | 0.67 | 0.89 | 6 | +$39.16 | Reliable |
Profitable on 4 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 88% of 95 · GBPUSD: better than 52% of 95 · USDJPY: better than 72% of 95 · XAUUSD: better than 69% of 96
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 69% | +1.60% 2026-06 | -0.90% 2026-03 |
| GBPUSD | 69% | +2.06% 2026-10 | -2.69% 2026-04 |
| USDJPY | 31% | +2.11% 2026-09 | -0.90% 2026-03 |
| XAUUSD | 46% | +36.01% 2026-01 | -14.21% 2026-02 |
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 is a trend-following system based on Bill Williams' Alligator indicator, using three smoothed moving averages with different periods and offsets (Jaw: period 13 offset 8, Teeth: period 8 offset 5, Lips: period 5 offset 3) to determine market trend state. Entry conditions: a buy signal is generated when the Lips line crosses above the Teeth and Jaw lines from below, and a sell signal is generated when the Lips cross below from above, representing the Alligator 'opening its mouth' as a trend begins. Exit conditions rely on the convergence of the Alligator lines (the Alligator 'closing its mouth') or an opposing crossover signal triggering position closure, with some versions optionally incorporating stop loss and take profit parameters for risk management. Position sizing uses a fixed lot approach where the user sets the trade volume directly via input parameters, without dynamic position sizing or percentage-of-equity calculations. In terms of money management, the EA provides stop loss and take profit parameters but may lack enforcement, creating a risk of excessive exposure when stops are not set. The overall strategy logic is clean and straightforward, suitable for strongly trending markets, but it tends to generate frequent false signals in ranging or choppy conditions, leading to consecutive losses.
Strengths
- Clear and concise strategy logic based on the classic Bill Williams Alligator indicator, easy to understand and verify
- Performs well in trending markets where the Alligator effectively identifies trend initiation and exhaustion
- Parameterized design allows easy optimization and adjustment for different instruments and timeframes
Weaknesses
- Generates frequent false signals in ranging markets as Alligator lines repeatedly cross, causing consecutive losses
- Fixed lot position sizing lacks flexibility, not adjusting dynamically based on account equity or volatility
- Default stop loss and take profit values of 0 pose risk of unlimited exposure when stops are not explicitly set
Possible improvements
- Add a trend strength filter (such as ADX or Awesome Oscillator) to suppress signals in weak trend environments and reduce false breakouts
- Implement ATR-based dynamic stop loss, take profit, and position sizing to adaptively adjust risk management parameters based on market volatility
Risk assessment
Overall risk: Medium
- Stop loss and take profit default to 0, providing no risk protection if user does not manually set them
- Lacks new bar check mechanism, potentially opening multiple positions on the same bar
- No existing position direction check, risk of repeatedly adding positions in the same direction
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Lots | 0.1 | Lot size per trade |
StopLoss | 0 | Stop loss in points, 0 means no stop loss |
TakeProfit | 0 | Take profit in points, 0 means no take profit |
JawPeriod | 13 | Alligator jaw period |
TeethPeriod | 8 | Alligator teeth period |
LipsPeriod | 5 | Alligator lips period |
JawShift | 8 | Jaw offset |
TeethShift | 5 | Teeth offset |
LipsShift | 3 | Lips offset |
MagicNumber | 123456 | EA magic number for identifying orders |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.