All indicators

Williams Fractal

By LuxAlgoApr 13, 2020

Williams Fractal is an indicator on Vela, our next-generation charting platform, written in Pine Script®.

Static chart image

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

Free to use

Run it on Vela. Go further with a paid plan.

  • Up to 500 Custom Alerts, with webhook automation
  • Up to 10× the chart history of Free
  • Orderflow lookback up to full history
  • More Quant usage to customize it, plus extra usage when you need it
  • Futures data alongside crypto, stocks, forex and commodities
See plans
Original indicatorBuilt in-house by LuxAlgo

Run it on Vela. Make it yours with Quant.

Open this indicator free on Vela, our next-generation charting platform. Then ask Quant, our coding agent built into Vela, to retune it or turn it into a backtested strategy of your own.