Skip to content
All library documents

Fractal Features for Trading Models: Patterns, Breakouts, and Look-Ahead Bias

Article MQL5 articles

Summary

The article presents a feature pipeline built around Bill Williams' fractals, defined as swing highs or lows confirmed by bars on both sides. It shows how these patterns can feed strength and validity measures, support and resistance levels, breakout flags, trend features, and filtered buy or sell signals. Their structural form can be applied across bar frequencies, but a detected turning point is only confirmed after the bars on its right have arrived.

That confirmation creates the central risk: a centered rolling window places the fractal at a time when it was not yet knowable. The article recommends shifting such features to their confirmation time at the feature boundary, and distinguishes raw values that may be useful for label construction from causal values suitable as model inputs. It also identifies inconsistencies in how the shift is applied, a strength alignment fixed to the default setting, a static threshold described as volatility-based, and a sparse rolling window that counts fractal events rather than bars. These are implementation notes, not evidence that fractal signals are profitable.

Key ideas

  • A Williams fractal identifies a local swing high or low using confirming bars on both sides.
  • Centered rolling windows introduce look-ahead bias when their outputs are treated as available at the center bar.
  • Shift confirmed fractal features to the time when the required future bars have arrived before using them as predictors.
  • The pipeline derives support and resistance, breakout, trend, and filtered signal features from fractal detections.
  • The article flags inconsistent shifting, a hard-coded strength alignment, a static validation threshold, and event-count-based rolling windows.

Tags

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