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 Fractal Swing Pullback strategy is a pure price-action swing-trading approach built on Bill Williams-style fractals — a classic chart pattern that marks short-term swing highs and swing lows formed by a cluster of consecutive candles. Unlike systems that lean on moving averages, oscillators, or other calculated indicators, this strategy reads the market directly from raw bar geometry. Every decision it makes — where the swing points are, whether the trend is up or down, and where to place protective stops and targets — comes from the highs and lows of the candles themselves.
A fractal in this context is simply a pivot point. A confirmed up fractal is a bar whose high stands strictly above the highs of a set number of bars on both its left and right sides, making it a local swing high. A down fractal is the mirror image: a swing low surrounded by higher lows. Because the pattern needs bars on both sides to confirm, recognition naturally lags by a few candles — and that lag is exactly what filters out random noise and keeps the swing points meaningful.
This strategy is designed for trending market conditions and is best understood as a learning tool for traders who want to study market structure, pullback entries, and structural risk placement. It is well suited to anyone curious about how a discretionary "buy the dip in an uptrend" idea can be expressed as a fully mechanical rule set. It is not a shortcut to results, and you should treat it as a framework for analysis and study rather than a finished product.
How It Works
The Fractal Swing Pullback strategy only acts on fully closed bars — it ignores the still-forming candle so that signals are stable and never repaint. Once a bar closes, the strategy checks whether a new fractal has just been confirmed and, if so, evaluates the surrounding market structure.
Here is what the strategy does, step by step:
- Detecting swings: On each closed bar, the strategy looks back to a candidate "center" bar and compares it against
FractalWingbars on each side. If the center bar's high is the highest of the group, an up fractal (swing high) is confirmed. If its low is the lowest, a down fractal (swing low) is confirmed. - Reading market structure: The strategy keeps the last two confirmed fractals of each type. It then defines structure from them:
- Uptrend = a Higher High and a Higher Low (HH + HL) — price is making progressively higher swings.
- Downtrend = a Lower High and a Lower Low (LH + LL) — price is making progressively lower swings.
- Long entry signal: The strategy signals a long (buy) when a new down fractal confirms a higher low inside an uptrend. In plain English, price pulled back, carved out a swing low that is higher than the previous one, and the broader structure is still rising. This is a textbook pullback-continuation entry.
- Short entry signal: The strategy signals a short (sell) when a new up fractal confirms a lower high inside a downtrend — price bounced, made a swing high lower than the last one, and the structure is still falling.
- Stop-loss logic: The stop is placed just beyond the protective swing — the very fractal that triggered the entry. For a long, the stop sits below the swing low; for a short, above the swing high. A buffer is then added, scaled to that swing bar's own range (its high minus low) and multiplied by the
StopBufferFraction. Wider swing bars therefore get a slightly wider buffer. - Take-profit logic: The target is a fixed reward-to-risk multiple of the structural risk. The strategy measures the distance from entry to stop (the "risk"), multiplies it by
RewardRiskRatio, and projects that distance in the direction of the trade to set the take-profit. - One trade at a time: The strategy holds only a single position per symbol and magic number. While a trade is open, no new entries are taken until it closes at the stop or target.
Because both the stop and target are anchored to real swing structure rather than fixed pip values, the position size of each trade's risk adapts to the volatility present at the swing.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| FractalWing | 2 | 2 | 5 | The half-width of a fractal — the number of bars required on each side of a swing point for it to confirm. Larger values demand bigger, more significant swings and confirm more slowly. |
| RewardRiskRatio | 2.0 | 1.0 | 4.0 | The take-profit distance expressed as a multiple of the structural (stop) risk. A value of 2.0 sets the target twice as far from entry as the stop. |
| StopBufferFraction | 0.5 | 0.0 | 2.0 | Extra stop distance placed beyond the protective swing, as a fraction of that swing bar's range. Higher values give the trade more breathing room; 0 places the stop right at the swing. |
| Lots | 0.10 | 0.01 | 1.0 | The fixed trade size, in lots, used for each position. |

Recommended Chart Settings
The Fractal Swing Pullback strategy is a swing approach and is generally most at home on higher timeframes such as the H1 (1-hour) or H4 (4-hour) charts, where fractals mark more meaningful structure and signals arrive at a manageable pace. Major liquid forex pairs such as EUR/USD are a sensible starting point for study because their cleaner trends tend to produce clearer swing structure.
That said, fractals form on every symbol and timeframe, and the right combination depends heavily on the instrument you are studying. Results will vary considerably across different market conditions, sessions, and volatility regimes. Always test any setting combination on historical data and a demo account before drawing conclusions, and remember that what looks favorable on one period may behave very differently on another.
How to Install on MetaTrader 5
- Download the
FractalSwingPullback.ex5file from the link below. - Copy it to your MT5
MQL5\Expertsfolder. - Restart MetaTrader 5 or refresh the Navigator panel.
- Drag the EA onto a chart matching the recommended symbol and timeframe.
- Configure the input parameters and enable Algo Trading.
What to Consider Before Using This EA
Like every approach, the Fractal Swing Pullback strategy has clear strengths and equally clear limitations. Understanding both is part of using it responsibly as a learning tool.
Strengths:
- Transparency. Because there are no indicators, every signal can be traced back to specific candles on the chart. This makes it an excellent teaching tool for understanding market structure and pullback logic.
- Structural risk placement. Stops and targets are anchored to real swing points, so risk is defined by the market rather than by an arbitrary fixed number.
- No repainting. Acting only on closed bars and confirmed fractals means the signals you see in testing are the signals the strategy actually traded.
Limitations:
- Range-bound markets. This is a trend-continuation strategy. In sideways or choppy conditions, the HH/HL or LH/LL structure rarely holds, and the strategy may produce whipsaw entries or sit idle.
- Confirmation lag. Fractals only confirm after
FractalWingbars have closed on each side. This lag improves reliability but means entries arrive after part of the move has already happened. - Fixed reward-to-risk. A static target multiple does not adapt to changing volatility or support/resistance, so trades may be stopped just short of a target that price was approaching, or exit before a larger move completes.
- Fixed lot sizing. The
Lotsparameter does not scale with account equity or per-trade risk, so position size should be reviewed manually.
The strategy may underperform during consolidations, news-driven spikes, and low-liquidity sessions where swing structure becomes unreliable. Treat it as a structured way to study price action, not as a finished or guaranteed system.
Risk Management Tips
Sound risk management matters far more than any single entry rule. As you study this strategy, keep these general principles in mind:
- Risk a small, fixed percentage per trade. Many educators suggest risking no more than 1–2% of account equity on any single position. Because this EA uses a fixed lot size, you may need to adjust the
Lotsvalue so that the distance to your structural stop translates into an acceptable percentage of your account. - Start on a demo account. Run the strategy in a risk-free simulated environment first so you can observe how it behaves across different conditions before committing real capital.
- Understand drawdown. Even a well-structured strategy will experience losing streaks. Know in advance how large a drawdown you are emotionally and financially prepared to tolerate.
- Use a single, consistent process. Avoid changing parameters mid-trade or overriding signals impulsively. Consistency is what makes any test meaningful.
- Account for costs. Spreads, commissions, and slippage all reduce real-world outcomes compared with idealized backtests.
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
- Expert Advisor: FractalSwingPullback.ex5 (2 downloads)
- Source Code: FractalSwingPullback.mq5 (2 downloads)
- Documentation: FractalSwingPullback.pdf (2 downloads)