Skip to content
All library documents

Four Fractal-Based Trend, Breakout, Compression, and Divergence Setups

Article MQL5 articles

Summary

The article turns Bill Williams’ five-bar fractals into rule-based trading patterns for an MQL5 expert advisor. It describes repeated fractal lows or highs as possible support or resistance, a close beyond a prior fractal as a breakout, compressed swing points as a potential expansion setup, and disagreement between price swings and fractal swings as divergence. It also discusses additional patterns and timeframe choices, emphasizing that larger intervals produce slower signals while smaller intervals can be noisier. The examples use custom high and low fractal checks to handle indicator-buffer values.

The author describes optimizing patterns on one year and forward-running them on another, including GBPUSD and USDJPY examples on four-hour charts, but the supplied text does not give detailed performance figures for these pattern reports. The compression rule is acknowledged as crude because it compares fractal range with price movement and can pass too easily in strong trends; an absolute threshold is suggested as an alternative. Fractals can be invalidated by low-volume spikes, so volume or footprint analysis may help filter signals. Results remain dependent on instrument, timeframe, and test design.

Key ideas

  • A fractal marks a local high or low within a five-bar price pattern and can be used to define swing levels.
  • Repeated fractals in one direction may indicate a developing support or resistance area.
  • A close beyond a prior fractal level can define a breakout or possible trend reversal setup.
  • Compressed fractal ranges and disagreement between fractal swings and price swings provide candidate signals, with limitations.
  • The article uses optimized and forward test periods, while warning that timeframe, liquidity, and false breaks affect reliability.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.