# Williams Fractal

Williams Fractal is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Marks fractal points on the chart, an up fractal at a high flanked by lower highs on both sides and a down fractal at a low flanked by higher lows, confirmed only after the flanking bars have printed. The default period of 2 requires two bars on each side of the extreme, matching Bill Williams' original definition. This is the plain, standard Williams Fractal implementation.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Apr 13, 2020.
- Access: free.
- Concepts: [Williams Fractal](https://www.luxalgo.com/library/concept/williams-fractal/) (primary), [Bill Williams Profitunity](https://www.luxalgo.com/library/concept/bill-williams-profitunity/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=nxctb6e7qxm3x4fc4dksp58z
- Page: https://www.luxalgo.com/library/indicator/williams-fractal/

The **Williams Fractal** marks objective swing points directly on the chart: an up fractal prints at a high flanked by lower highs on both sides, and a down fractal at a low flanked by higher lows, with each marker confirmed only after the flanking bars have completed. The default period of 2 requires two bars on either side of the extreme (Bill Williams' original five-bar pattern), and this build implements that plain, standard definition, requiring the extreme to strictly exceed every neighboring bar.

The appeal is mechanical objectivity: no drawing, no judgment, just rule-based local extremes feeding breakout triggers, trailing stops, and support and resistance levels.

## How to Trade the Williams Fractal?

- **Up Fractal markers** (triangles above the bar): confirmed swing highs, natural resistance references and classic locations for breakout buy stops.
- **Down Fractal markers** (triangles below the bar): confirmed swing lows, serving as support references and the levels sell stops rest beneath.
- **A break beyond the most recent fractal**: the classic Trading Chaos trigger, taken only in the direction of a separate trend filter.
- **Successive fractals as trailing anchors**: in an uptrend, stepping a stop up behind each fresh down fractal ratchets risk behind structure.

Fractals print often (a two-bar flank is a low hurdle), so raw signals benefit from a directional filter.

## Williams Fractal Settings

- **Periods** (default 2): bars required on each side of the candidate extreme. The default reproduces the classic five-bar fractal; raising it yields fewer, more significant swings that confirm proportionally later. This is the build's only functional input. The marker colors are style options.

## Frequently Asked Questions

### Do Williams Fractals repaint?

No, but they lag. No marker can print until the flanking bars to the right of the extreme have completed, so each one is drawn that many bars behind the live edge (two at the default) and is fixed once printed. The **Up Fractal Confirmed** and **Down Fractal Confirmed** alerts fire at that confirmation moment, not at the extreme itself.

### What is the best Periods setting?

The default of 2 matches the classic definition and is the natural starting point. Wider values print fewer, cleaner swings but confirm later, so the input chooses the swing size you work at rather than a best value.

### How do fractals differ from a ZigZag?

A fractal is pure local bar geometry: any qualifying five-bar extreme counts, however small the move. A zigzag admits only reversals beyond a size threshold and never marks two highs or two lows in a row. Fractal markers are therefore denser and less selective: raw swing candidates for structure logic or a filter to refine.

## Related indicators

- [Market Structure CHoCH/BOS (Fractal)](https://www.luxalgo.com/library/indicator/market-structure-choch-bos-fractal/) (Williams Fractal): markdown at https://www.luxalgo.com/library/indicator/market-structure-choch-bos-fractal.md
- [Williams Alligator](https://www.luxalgo.com/library/indicator/williams-alligator/) (Bill Williams Profitunity): markdown at https://www.luxalgo.com/library/indicator/williams-alligator.md
- [Awesome Oscillator](https://www.luxalgo.com/library/indicator/awesome-oscillator/) (Bill Williams Profitunity): markdown at https://www.luxalgo.com/library/indicator/awesome-oscillator.md
- [Structure & Trend Dashboard](https://www.luxalgo.com/library/indicator/structure-trend-dashboard/) (Swing Structure Grammar): markdown at https://www.luxalgo.com/library/indicator/structure-trend-dashboard.md
- [HTF Swing Structure Signals](https://www.luxalgo.com/library/indicator/htf-swing-structure-signals/) (Swing High/low): markdown at https://www.luxalgo.com/library/indicator/htf-swing-structure-signals.md
- [Price Action Concepts](https://www.luxalgo.com/library/indicator/luxalgo-price-action-concepts/) (Swing Structure Grammar): markdown at https://www.luxalgo.com/library/indicator/luxalgo-price-action-concepts.md
- [Market Structure & Fibonacci Zones + RR](https://www.luxalgo.com/library/indicator/market-structure-fibonacci-zones-rr/) (Swing Structure Grammar): markdown at https://www.luxalgo.com/library/indicator/market-structure-fibonacci-zones-rr.md
- [Liquidity Sweeps](https://www.luxalgo.com/library/indicator/liquidity-sweeps/) (Swing High/low): markdown at https://www.luxalgo.com/library/indicator/liquidity-sweeps.md

---

Source: https://www.luxalgo.com/library/indicator/williams-fractal/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
