Blog / Strategy
Strategy

Williams Fractal Trend Breakout

Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.

What Is This Strategy?

The Williams Fractal Trend Breakout is a trend-filtered breakout strategy that combines Bill Williams fractals — a classic swing-point indicator — with a dual exponential moving average (EMA) trend filter to decide when a genuine breakout is worth trading. A fractal marks a confirmed pivot in price: an "up" fractal is a bar whose high sits strictly above the highs of a set number of bars on either side (a confirmed swing high), while a "down" fractal is the mirror image (a confirmed swing low). Rather than chasing every wiggle, this strategy waits for a bar to close beyond the most recent confirmed swing point before it acts.

Unlike pullback or mean-reversion systems, this is a momentum-oriented approach. It is designed for liquid, trending markets — think major forex pairs such as GBPUSD, metals like XAUUSD (gold), or major stock indices — where price tends to expand in one direction once a key level gives way. The EMA trend filter is what keeps it disciplined: long breakouts are only considered when the fast EMA is above the slow EMA (an uptrend), and short breakouts only when the fast EMA is below the slow EMA (a downtrend). Breakouts that fight the trend are simply ignored.

As a learning tool, the Williams Fractal Trend Breakout is well suited to traders who want to study how objective swing detection, trend confirmation, and volatility-based risk sizing fit together in a single rules-based system. Because every stop and target is scaled by Average True Range (ATR) — a measure of recent volatility — the logic adapts to whatever symbol or timeframe it runs on. Frame this as a study of how a breakout system is structured, not as a shortcut to results.

How It Works

The strategy evaluates its rules only once per freshly closed bar, which avoids reacting to the noise of an unfinished candle. Here is what happens on each completed bar:

In short, the strategy signals a trade only when a confirmed swing point is broken in the direction of the prevailing trend, and it manages that trade with volatility-scaled exits.

Williams Fractal breakout MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
FractalWing 2 2 5 Half-width of the fractal — the number of bars required on each side of a swing before it is confirmed. Larger values demand more significant swings and confirm more slowly.
FastEma 20 5 60 Period of the fast EMA used in the trend filter. A shorter period reacts more quickly to price.
SlowEma 50 20 200 Period of the slow EMA used in the trend filter. The relationship between fast and slow EMA defines the trend direction.
AtrPeriod 14 7 30 Lookback period for the ATR used to size the stop-loss and take-profit.
AtrSlMult 1.5 0.5 4.0 Stop-loss distance as a multiple of ATR. Higher values give the trade more room but risk more per position.
AtrTpMult 3.0 1.0 6.0 Take-profit distance as a multiple of ATR. Sets the profit target and, together with the stop multiple, the reward-to-risk ratio.
Lots 0.10 0.01 1.0 Fixed trade size in lots for each position.

Note that the strategy keeps the slow EMA strictly slower than the fast EMA and the fractal wing at a minimum of two bars, adjusting the inputs internally if a chosen combination would break that rule.

Williams Fractal breakout MT5 EA — MQL5 source code

Recommended Chart Settings

The Williams Fractal Trend Breakout was designed with liquid, trending instruments in mind — for example GBPUSD, XAUUSD (gold), or major indices — on intraday-to-swing timeframes such as the M30, H1, or H4 charts. Importantly, the code is not locked to any single timeframe: every bar read uses the chart's own timeframe, so the strategy runs on whatever chart you attach it to. This makes it a useful sandbox for studying how the same logic behaves across different symbols and timeframes.

Because breakout behaviour depends heavily on volatility and trend persistence, results will vary considerably across different market conditions. A setting that looks reasonable on gold may behave very differently on a range-bound currency pair. Always test any configuration on your own data and broker feed before drawing conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Every strategy has strengths and trade-offs, and understanding them is part of trading education.

Strengths of this approach:

Known limitations:

The strategy is best understood as a framework for studying trend-filtered breakouts, not as a finished product to deploy without your own research and testing.

Risk Management Tips

Sound risk management matters more than any single entry rule. Consider these general principles as you study any automated strategy:

Risk Warning

Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.

Downloads

← Back to Blog