A Fractal marks a confirmed local swing high or swing low on the price chart — a small arrow sitting above a peak or below a trough once the price action around it has actually proven the point was a turning point. Fractals were designed by Bill Williams, the same trader behind the Alligator, as part of a broader trading system built around chaos theory. Unlike most indicators on this site, a Fractal isn't a smoothed line or a calculated value plotted against price — it's a simple, mechanical pattern-recognition rule applied directly to raw highs and lows, and that simplicity is exactly what makes it worth understanding carefully: it's easy to compute, but easy to misread if you don't know about the lag built into its definition.
How a Fractal Forms
A Fractal is a five-bar pattern, nothing more. Look at any run of five consecutive bars and compare the middle one — the third bar — to the two bars on either side of it:
- Up-Fractal — the middle bar's high is higher than the highs of the two bars immediately before it and the two bars immediately after it. That middle bar is a local swing high, and an arrow prints above it.
- Down-Fractal — the middle bar's low is lower than the lows of the two bars immediately before it and the two bars immediately after it. That middle bar is a local swing low, and an arrow prints below it.
That's the entire definition. There's no averaging, no smoothing, no weighting — just a direct comparison of five highs or five lows. Because of that, Fractals show up on literally any market and any chart, and they show up often: every genuine zig-zag in price eventually produces one. The tradeoff for that simplicity is that a Fractal says nothing about the size of the move around it — a swing high on a quiet 10-pip pullback prints exactly the same kind of arrow as a swing high at the top of a 200-pip rally, which is something to keep in mind before treating every arrow as equally important.
The Confirmation Lag: Why You Only Know Two Bars Later
This is the single most important thing to understand about Fractals, and it's easy to gloss over: a Fractal cannot be confirmed in real time. Because the definition requires two bars to have already formed after the candidate bar, the earliest moment you can know a swing high or swing low was real is two bars after it happened — not when it happened.
Look at the included alert code to see this lag made explicit. Both the MT4 and MT5 versions check specifically at shift 2 — iFractals(NULL, 0, MODE_UPPER, 2) in MQL4, or index 2 of a freshly copied buffer in MQL5 — rather than at shift 0 or 1, precisely because a fractal can't exist yet at those more recent bars; there simply hasn't been enough price history after them to confirm the pattern. The alert only fires once that confirmation is in, which means by the time you see "new Up-Fractal confirmed," price has already moved on for two full bars past the actual peak or trough.
This isn't a bug or a shortcut in the code — it's inherent to what a Fractal is. No amount of clever coding can make a five-bar pattern confirm itself in less than five bars' worth of price action. Traders who don't internalize this sometimes assume the arrow marks "right now," draw a line straight to it, and are confused when price has already run past that level by the time the arrow actually appears on their chart. The lag is the price you pay for a swing point that is genuinely confirmed rather than a guess.
Entry Conditions
Because a Fractal marks a specific price rather than giving a BUY/SELL signal by itself, traders generally use it in one of two ways rather than trading the arrow directly:
- As a breakout level — once an Up-Fractal is confirmed, its exact price becomes a level to watch. A break above that level on a later bar is read as continuation of upward momentum (mirrored below a confirmed Down-Fractal for downside continuation). This treats the fractal price almost exactly like a small-scale support and resistance level, and the same caution against false breakouts applies — many traders wait for a candle close beyond the fractal price rather than acting on the first wick through it.
- As a stop-placement reference — a confirmed Down-Fractal beneath a recent low is a natural place to anchor a Stop Loss on a long position (and a confirmed Up-Fractal above a recent high does the same for a short), since a genuine reversal should leave that swing point intact.
Neither use requires trading the moment the arrow prints — by definition you can't, since the arrow only exists two bars after the fact. What both uses share is treating the confirmed price level itself as useful information going forward, not treating the arrow as a live trigger.
Parameters
The Fractals indicator has no configurable period, and that's worth calling out explicitly since it's different from almost every other indicator on this site — RSI, CCI, and ATR all take a period input that a trader can shorten or lengthen to trade responsiveness against noise. A Fractal has nothing to tune because the pattern is defined by a fixed count: five bars, middle bar compared against exactly two on each side. Change that count and it stops being the Bill Williams Fractal definition — it becomes a different pattern entirely. The only inputs on the included alert indicator (EnableAlert, EnablePush) control whether and how you're notified when a new fractal confirms; they don't change how a fractal is detected.
Fractals and the Alligator: Built to Work Together
Bill Williams never intended Fractals to be traded alone. In his original system, Fractals mark where a potential turning point sits, while the Alligator provides the context for whether acting on one makes sense: a Fractal breakout that lines up with the Alligator's lines fanned out and awake in the same direction has a trending market behind it, while a Fractal breakout that fires while the Alligator is still sleeping and tangled is much more likely to be noise inside a range. The usual sequence in the full Bill Williams method also brings in the Awesome Oscillator as a momentum filter — confirming the breakout through a fractal level has real strength behind it rather than a weak poke through the level. Used together, the three tools answer three different questions: Fractals answer "where," the Alligator answers "is the market even trending," and the Awesome Oscillator answers "does this specific move have momentum." Used alone, a Fractal only ever answers the first question.
A Word of Caution
The confirmation lag means you will never catch the exact top or bottom of a swing using Fractals — by the time the pattern is confirmed, price is already two bars removed from that extreme, and in a fast-moving market two bars can be a meaningful distance. Anyone marketing a Fractal-based system as picking "the exact turn" is glossing over this limitation. Fractals are also noisy in choppy, sideways conditions: because the pattern is purely mechanical and requires nothing about the size of a move, a ranging market throws off a steady stream of small, low-value swing points that mean very little on their own, cluttering the chart with arrows that don't correspond to any tradeable structure. This is exactly why Bill Williams paired Fractals with a trend filter rather than shipping them as a standalone system — without the Alligator's read on whether a market is trending or asleep, it's easy to mistake ordinary chop for meaningful structure. Treat a Fractal as a well-defined reference price worth watching, not a timing signal to act on the instant it appears.
Download the Indicator
This custom indicator plots confirmed Up-Fractals and Down-Fractals directly on the chart, with automatic alerts whenever a new fractal confirms. It's available for both MetaTrader 4 and MetaTrader 5 below.
How to Install — MetaTrader 4
- Download the
fractals-alert.mq4file below. - Open MetaTrader 4 → click
File→Open Data Folder. - Place the file in the
MQL4/Indicatorsfolder. - Restart MetaTrader 4, then drag the indicator from the Navigator window onto the chart.
How to Install — MetaTrader 5
- Download the
fractals-alert.mq5file below. - Open MetaTrader 5 → click
File→Open Data Folder. - Place the file in the
MQL5/Indicatorsfolder. - Restart MetaTrader 5, then drag the indicator from the Navigator window onto the chart.
Both files are source code — open and review the full code before using it, for your own safety.