Camovia Tray™

Fractals (Bill Williams)

Fractals mark every local extreme on the chart: the highest bar of a five-bar window gets an arrow — these are natural swing highs/lows, the atoms of structure and breakout triggers.

What it is

The Fractals indicator, developed by Bill Williams: an up fractal is a bar whose high exceeds the highs of the two bars on each side (a local high of a 5-bar window); down fractals mirror it. The indicator draws arrows above/below these local extremes — the joints of market structure: endpoints of swings, breakout trigger lines, and anchors for structural trendlines. Fractals carry no direction judgment themselves; they are structural raw material — in the Williams system the Alligator supplies direction and the Fractals supply triggers.

Origin

Fractals also come from Bill Williams's chaos-trading framework ("Trading Chaos", 1995). Williams borrowed the mathematical term to express that local extremes repeat self-similarly across timeframes. In the system, fractals are the entry trigger (after the Alligator opens its mouth, price breaking the latest up fractal = the long trigger) and structural locators (fractal-to-fractal trendlines). MT5 ships it as a main-chart arrow indicator (iFractals).

Download Camovia Tray free — check quotes, manage positions, and hide in one click from your system tray.

Download Free

The formula

The identification rules (pure structure, no math):

Up fractal ↑ = a bar whose High > the highs of the 2 bars on each side (local high of a 5-bar window)
Down fractal ↓ = a bar whose Low < the lows of the 2 bars on each side (local low of a 5-bar window)

The key property: a fractal can only be confirmed after the 2 bars to its right complete — the latest fractal is structurally 2 bars late; that is by design, not a flaw. MT5 needs no parameters (fixed 5-bar window). Tie cases (equal highs) are handled slightly differently across platforms.

Worked example

A five-bar window example:

  1. The highs of bars 1–5 are 101, 103, 107, 105, 102.
  2. Bar 3 (107) exceeds the two bars on each side → an up-fractal arrow is drawn above bar 3.
  3. But the arrow only appears when bar 5 closes — a structural 2-bar confirmation lag.

The arrows mark extremes that have already happened — their value is not prediction but making the structural joints explicit: breaking the latest up fractal is the trigger of continued upward structure, and vice versa.

How to read it

Structural reads of the arrows:

Range Common interpretation
The latest up fractal ↑ Its price is the current resistance/breakout trigger — after a bullish Alligator mouth-open, breaking it = the long trigger
The latest down fractal ↓ Its price is the current support/breakdown trigger — symmetric for shorts
Higher highs + higher up fractals Rising structure — the structural signature of an uptrend
Clusters of fractals A consolidation box — its top and bottom are defined by the fractal groups
Fractal-to-fractal lines Williams's fractal trendlines: connecting two up fractals gives a dynamic resistance

The arrows are everywhere (almost every wiggle prints one) — the correct use is never "trade every arrow" but "take the latest one" as trigger/stop reference, treating the rest as background structure.

Common signals & usage

Breakout trigger (in-system)

Price breaking the latest fractal in the Alligator's mouth direction — the complete Williams-system entry: direction (Alligator) + trigger (Fractal).

Fractal stop-loss

After entry, the latest down fractal (for longs) as the initial stop — structurally more meaningful than an ATR stop (breaking it = structure broken).

Fractal trendlines

A line connecting two up (or two down) fractals — truer than a close-based trendline: it links extremes that were actually rejected.

Rising/falling structure

Successively higher up fractals + higher down fractals = rising structure (bearish mirrors) — a structural regime call earlier than MAs.

Limitations & common mistakes

  • The 2-bar lag is structural: a fractal does not exist until the right side completes — it is confirmed past; chasing forming fractals will get you stopped.
  • Too many arrows invite overtrading: every small wiggle prints one — always filter with the Alligator direction first.
  • Dense clusters in ranges: boxes alternate up/down fractals — breakout triggers inside a box are all false (back to the sleeping-alligator discipline).
  • Tie-handling differs by platform: with equal highs, platforms may mark different bars — MT5 marks the first.
  • No direction, no momentum: fractals are structure points only — direction comes from the Alligator, momentum from AO; trading fractals alone is a framework-less system.

Fractals in MT5

Fractals is a built-in MT5 Bill Williams indicator (up/down arrows on the main chart). The MQL5 function for programmatic use is iFractals:

int iFractals(string symbol, ENUM_TIMEFRAMES period);
MQL5 function iFractals() (no parameters — the window is fixed at 5 bars)
Buffers 0=up fractal (UPPER_LINE), 1=down fractal (LOWER_LINE)
Empty-value semantics Bars without a fractal carry EMPTY_VALUE (must be filtered in code)
Confirmation lag 2 bars to the right — the latest arrow lags by 2
Display window Main chart (arrow overlay)

iFractals takes no period parameter (fixed 5-bar window). When reading values programmatically: buffers carry values only on fractal bars, EMPTY_VALUE elsewhere — skip empties when iterating. To find "the latest up fractal", search backward for the nearest non-empty value.

Behavior across timeframes

15-minute

Arrows are dense — take only the latest fractal agreeing with the Alligator direction as a trigger, ignore the rest

1-hour / 4-hour

The main period for in-system breakout triggers: fractal trigger + Alligator direction is the classic combo

Daily

The best period for structure calls (rising/falling) and fractal trendlines

Weekly

Weekly fractals are the joints of monthly structure — long-term support/resistance anchors

Indicator combinations

The standard in-system pairings for Fractals:

  • With Alligator: the Alligator sets direction, fractals trigger — the inseparable core combo of the framework. ALLIGATOR
  • With AO: fractal breakout + AO momentum in the same direction — structural trigger double-checked by momentum. AO
  • With ATR: fractal stops cross-checked with ATR (stop distance should be < 1.5×ATR, otherwise downsize the position). ATR

FAQ

Q Why is the indicator called "Fractals"?

Bill Williams borrowed the mathematical term to express that market extremes repeat self-similarly across timeframes: the 5-bar local high/low structure appears identically on minutes, hours, dailies and weeks. MT5's built-in implements only the basic "5-bar extreme marker".

Q Why does the newest fractal arrow need 2 more bars to appear?

By definition: an up fractal requires the bar to exceed "the 2 bars to its right" — until they complete, the question is undecidable. This structural lag is a feature: every arrow you see is confirmed.

Q There are fractals everywhere — which one matters?

Only the latest one: it defines the current breakout trigger and the stop reference. The systematic usage: let the Alligator pick the direction (a bullish mouth-open means watching up fractals only), then take the nearest one — the rest are background.

Q Can I trade fractals alone?

Not recommended. Fractals are structure points (local extremes) with no direction or momentum — Williams designed them to work with the Alligator (direction) and AO (momentum). Trading fractal breakouts alone is using raw material as the finished product.

Q How do I add Fractals in MT5?

Menu: Insert → Indicators → Bill Williams → Fractals, or drag it from the Navigator onto the main chart. No parameters (fixed 5-bar window); arrows are drawn automatically above/below qualifying bars.

Turn MT5 / MT4 into a Tray Tool

Check quotes, manage positions, and hide in one click.

Download Camovia Tray

This page is educational content about a technical indicator. It is not investment advice. Indicator signals can and do fail — always combine them with your own risk management.