Concept
Williams Fractal
Williams Fractal, also known as fractal chaos bands/oscillator, is a Market Structure concept. The Library holds 2 implementations, each one a working definition you can pull into Quant.
Top Williams Fractal indicator
The top custom implementation, built on the original standard Williams Fractal formula.
2 total
Any of the 2 Williams Fractal implementations below can become a backtested trading strategy — describe your rules and Quant writes the code.
The standard Williams Fractal indicator
Williams Fractal exactly as classically defined: the faithful reference build of the original formula, free to run in Quant.
What is a Williams Fractal?
A Williams Fractal is a five-bar swing marker popularized by Bill Williams in his Trading Chaos work. An up fractal prints on a bar whose high stands above the highs of the two bars on each side; a down fractal prints where a bar's low sits below the two lows on each side. It is among the simplest widely used objective definitions of a swing high or low: no subjective drawing, just a local extreme over five bars. Implementations differ slightly on how ties are handled, with strict inequality the common default.
Two properties define how fractals behave in practice. First, confirmation lags by two bars: the pattern cannot exist until the two right-hand bars have closed, so the marker always appears in the past. Second, fractals are frequent, since a two-bar flank is a low hurdle; in Williams' own system they were therefore filtered by the Alligator and traded only as breakouts in the trend direction. Beyond that origin, the fractal has become a general-purpose building block: a mechanical swing definition feeding structure logic, trailing stops, and support and resistance levels.
How to identify a Williams Fractal
The definition is mechanical, which is exactly its appeal. A standard fractal needs five completed bars.
- 1Take a candidate bar plus the two bars before it and the two bars after it.
- 2Up fractal: the candidate's high is higher than all four neighboring highs. Down fractal: the candidate's low is lower than all four neighboring lows. A single bar can qualify as both.
- 3Wait for confirmation: the two right-hand bars must close first, so a fractal is only known two bars after the extreme actually printed. Anything drawn earlier is provisional.
- 4Adjust conventions as needed: some versions accept equal highs or lows on the flanks, and widening the flanks beyond two bars produces fewer, more significant swings at the cost of later confirmation (this is the pivot strength parameter).
How it's calculated
Marks a local turning point: a bar whose high (or low) exceeds the highs (lows) of the n bars on each side of it.
Bill Williams' original definition uses n = 2.
Tie handling varies: many implementations require strict inequality against every neighbor, others allow equal highs on the older side.
The fractal chaos oscillator prints +1 on bars forming an up fractal, -1 on bars forming a down fractal, and 0 elsewhere.
How traders use it
- As the swing vocabulary for structure logic: the most recent up and down fractals define the swing points that break of structure and change-of-character rules are evaluated against. Many structure tools are fractal detection under the hood.
- As breakout triggers, the original use: Williams placed buy stops just above the latest up fractal when it formed above the Alligator's teeth, ignoring fractal signals on the wrong side of that line. Later tools generalize the idea into a stair-stepped breakout channel built from successive fractal levels.
- As trailing stop anchors: in an uptrend, trail the stop under each newly confirmed down fractal, a mechanical form of the structure stop.
- As resting-liquidity markers: untouched fractal highs and lows are local extremes where stops tend to accumulate, so some traders track which fractals have been swept and which remain open as potential targets.
Williams Fractal vs related concepts
Swing High/low: Swing high/low is the general idea of a local price extreme; the Williams Fractal is one specific parameterization of it: two bars on each side, confirmed at the close of the fifth. Every fractal is a swing point, but a swing point can be defined in other ways.
Pivot Strength: Pivot strength generalizes the flank count: a strength-N pivot needs N lower highs on each side of a high. A standard Williams Fractal is simply a strength-2 pivot, so the two concepts differ only in whether the width is fixed or a tunable parameter.
Zigzag Structure: Zigzag filters swings by magnitude, requiring a minimum percent or ATR move between pivots, while fractals filter only by local bar geometry. A zigzag leg keeps redrawing while it extends; a confirmed fractal is fixed once its two right-hand bars close.
Concept family
Market Structure
31 concepts mapped · 31 in the Library
Williams Fractal FAQ
Turn Williams Fractal into a trading strategy.
Take any implementation from this page into Quant, then build on it, backtest it on real data, and keep refining it in conversation.
.png&w=3840&q=75)
