Fractals at Close prices EA
This EA trades based on Bill Williams' Fractal indicator applied to Close prices, entering long positions when price breaks above an up-fractal and short positions when price breaks below a down-fractal. It is a classic breakout system that uses fractal levels as dynamic support and resistance zones to generate trade signals. The EA automatically opens and manages positions when the close price confirms a fractal breakout.
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 | -1.47% | -1.28% | 4.14% | 134 | 47.80% | -0.32 | -0.35 | 5 | −$1.10 | Reliable |
| GBPUSD | +2.33% | +2.02% | 4.44% | 135 | 48.90% | 0.46 | 0.53 | 6 | +$1.73 | Reliable |
| USDJPY | -0.14% | -0.12% | 4.80% | 139 | 40.30% | 0.00 | -0.03 | 6 | −$0.10 | Reliable |
| XAUUSD | +64.74% | +51.05% | 86.36% | 149 | 48.60% | 0.97 | 0.75 | 4 | +$42.08 | Reliable |
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 Breakout EAs with a reliable result on the same market: EURUSD: better than 22% of 18 · GBPUSD: better than 78% of 18 · USDJPY: better than 47% of 17 · XAUUSD: better than 68% of 19
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 46% | +1.31% 2026-06 | -1.73% 2026-08 |
| GBPUSD | 31% | +2.82% 2026-05 | -1.43% 2026-10 |
| USDJPY | 46% | +2.00% 2026-05 | -2.65% 2026-03 |
| XAUUSD | 46% | +151.91% 2026-03 | -31.75% 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 core strategy of this EA is based on breakout trading using Bill Williams' Fractal indicator. Entry conditions: a long position is opened when the close price breaks above the most recent up-fractal, and a short position is opened when the close price breaks below the most recent down-fractal. A fractal consists of at least 5 bars where the middle bar's high or low is the extreme, forming dynamic support and resistance levels. Exit conditions typically rely on an opposing fractal breakout signal or fixed stop-loss and take-profit settings. Position sizing may use fixed lots or account-balance-based calculation. Money management depends on the validity of the fractal structure, but fractal breakouts are prone to frequent false signals in ranging markets, leading to consecutive losses. Overall, this is a structured breakout-following system best suited for trending market conditions.
Strengths
- The fractal indicator is based on price structure without lagging parameters, effectively identifying key market turning points
- The strategy logic is clear and concise with well-defined entry rules, making it easy to understand and verify
- Breakout trading performs well in trending markets, capable of capturing significant trend moves
Weaknesses
- Fractal breakouts frequently produce false signals in ranging markets, leading to consecutive stop-losses and drawdowns
- Fractal confirmation requires at least 5 bars, introducing inherent lag that may cause missed optimal entry points
- Lacks a market state filter (trending vs ranging), treating all market conditions uniformly
Possible improvements
- Add a trend filter (e.g., ADX or moving average) to trade fractal breakouts only in trending conditions, avoiding false signals in ranging markets
- Implement dynamic stop-loss mechanisms (e.g., ATR-based or fractal opposite extreme stop) to improve risk-adjusted returns
Risk assessment
Overall risk: Medium
- False breakouts in ranging markets cause frequent entries and stop-losses, potentially leading to significant drawdowns
- Without stop-loss, a single losing trade can result in unlimited loss
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
LotSize | 0.1 | Fixed 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 |
FractalPeriod | 5 | Bar period for fractal calculation (default 5) |
MagicNumber | 0 | Order magic number to manage; 0 manages all orders |
Similar Breakout EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.