What Is the Fractal Indicator? Williams Fractals Explained
What the fractal indicator is: Bill Williams' five-bar swing marker, what the arrows mean, why the arrow prints two bars late, and how to test it.
The fractal indicator marks the bar in the middle of a five-bar group whose high is higher than the two highs on each side of it, or whose low is lower than the two lows on each side, and it draws a small arrow at that bar. It is Bill Williams' swing marker.
Because the test needs the two bars to the right of the extreme to exist, the arrow can only appear two bars after the bar it points at. That delay is where most of the confusion about this indicator lives, and it is not the same thing as an indicator redrawing its own history.
What is the fractal indicator?
A five-bar pattern that marks a local high or a local low, and one of the tools in Bill Williams' trading system. MetaTrader ships it as a built-in and gives the definition first-hand: the upward one is "a series of at least five successive bars, with the highest HIGH in the middle, and two lower HIGHs on both sides", and the mirror is "a series of at least five successive bars, with the lowest LOW in the middle, and two higher LOWs on both sides, which correlates to the sell fractal".
Note "at least five". Five is what the built-in uses, not what the idea requires.
Several different things are sold under the name "fractal indicator": the ICT "fractal model", fractal geometry overlays, and a number of vendors' own products with the word in the title. The one described here is the Bill Williams marker, the arrows you get from MetaTrader's Bill Williams group.
This has nothing to do with fractals in mathematics. The broker FXSSI says it plainly in its own guide: "the interpretation of fractals by Bill Williams has nothing in common with the same concept in mathematics".
How does the fractals indicator work?
It compares the high of one bar against the two highs on either side of it, and the low against the two lows on either side. Nothing else goes into it. If the middle bar has the highest high of the five, you get an up arrow above it. If it has the lowest low, you get a down arrow below it. One bar can satisfy both tests at once and carry both arrows.
The arrows are not drawn at an average or on a line. They sit at the price of the middle bar: "The fractals have High and Low values and are indicated with the up and down arrows in a chart."
Two published definitions are not this test.
Phemex writes that "The formula uses a five-bar pattern to calculate potential reversals to the upside or downside. In the five bars, if there are two highs or two lows, this indicates a reversal could come between them", and on the same page says the calculation "is based on a triple Simple Moving Average". Neither is the middle-bar test, and MetaTrader's own definition uses no moving average at all.
Binolla's blog defines the pattern by candle colour: "This pattern includes five candlesticks, three bullish and two bearish". Colour is not part of the test. Further down, the same page prints a chart where "the main rule of three bearish and two bullish candlesticks is broken. However, this is also a fractal", which sets aside its own rule.
The test is on highs and lows. A green or red middle candle makes no difference to it.
Where is Williams Fractals in ChartLabs?
In the chart's Indicators menu: open the Standard list and look under the Patterns heading, which holds three entries, for Williams Fractals. It draws on the price pane itself rather than in a pane below, an up triangle above the high of an up fractal and a down triangle below the low of a down one. The one setting is Periods, the number of bars on each side the middle bar has to beat. It is 2 by default, which is the five-bar group above, and 2 is also the smallest it goes.
Two decisions in ours are worth knowing before the sections below, because builds differ on exactly these. Ties do not count: the middle high has to be strictly higher than each of the highs on both flanks, which is TA-Lib's rule, where TradingView's built-in lets older highs equal the middle one. And the mark goes on the fractal bar itself rather than on the bar that confirms it, which is TradingView's placement, where TA-Lib flags the confirming bar. The mark still cannot show up until those confirming bars have closed.
Is the fractal up arrow bullish or bearish?
Neither. The arrow says where a local extreme is, not what to do about it. A direction only arrives when you add a rule, and the usual rule is which side of the fractal's price the market later breaks.
This matters because published guides use the words in opposite senses for the same marker:
| Source | The bar with the highest high of five | The bar with the lowest low of five |
|---|---|---|
| metatrader5.com | "the upwards fractal" | the set that "correlates to the sell fractal" |
| fbs.eu | "an up fractal", which the page labels bearish | a down fractal, which the page labels bullish |
So on one page the high-side marker is the one associated with buying, and on the other it is called bearish. FBS flags its own naming as it goes: "You may see a small complication in the naming compared to the usual methodology: bullish normally means rising and bearish usually refers to falling in the forex world. While here, you see that a bullish fractal is also a down fractal and a bearish fractal is an up fractal."
Both namings are internally consistent, which is why neither page is making a mistake. They answer different questions. MetaTrader's wording goes with the breakout use, where a move above the high-side fractal is the buy trigger. FBS names what the extreme itself suggests, a turn against the move that made it, and then uses the marker as a continuation signal with the trend as the deciding input: in a rising market it reads an up fractal as the move continuing and buys, and in a falling market it reads the same marker as the move continuing down and sells.
So ignore the label and read the rule. An arrow is a price level and a bar number. What you do at that level is a separate decision you have to write down.
Why does the fractal arrow appear two bars late?
Because the two bars to the right of the extreme have to close before the five-bar test can be checked at all. That is lag, and it is a different thing from an indicator changing its mind about the past.
LuxAlgo's page on the indicator separates the two: "A marker that appears two bars late is not repainting; it is the earliest moment the definition can be satisfied. Any fractal suggested on the live bar is provisional and can vanish. Honestly coded fractals are fixed once their right-hand bars close, which is why they suit backtesting, but the price has often moved by the time the marker prints."
Not everyone separates them. FXSSI puts both in one sentence: "According to the drawing principle, fractal will always lag by 2 or more candlesticks, and there's nothing we can do about it. Redrawing and lagging of indicators is a dangerous phenomenon, because an indicator can achieve very good backtesting results, but in fact, when a signal occurs, the price is much different from the signal one." The warning at the end is a good one. The wording bundles redrawing in with lag, and for a confirmed fractal those are not the same: once its right-hand bars have closed, the marker stays where it is.
FBS names the cost of the delay without dressing it up: "a Fractals indicator is a lagging indicator. Before a fractal finishes its formation or is seen to be discarded a market may have already moved significantly."
A confirmed fractal does not move afterwards, which is not true of every swing-marking tool. A ZigZag line, for instance, can redraw its most recent leg as new prices arrive.
What are the best fractal indicator settings?
The built-in version has no settings. There is nothing to tune.
MetaTrader's own programming reference settles it. Its entry for the indicator takes two inputs and neither is a bar count:
int iFractals(
string symbol, // symbol name
ENUM_TIMEFRAMES period // period
);
Here "period" is the chart timeframe, documented as "The value of the period can be one of the ENUM_TIMEFRAMES values, 0 means the current timeframe". It is not a lookback. There is no Depth, no Periods and no sensitivity on this build.
Third-party versions do add a bar count. FXSSI describes exactly that: "Since the given indicator is automatically set to draw fractals based on 5 candlesticks, fractals appear on the chart quite often. However, you can search for and download the indicator providing access to its settings, if you wish. That is, you can tell your terminal how many candlesticks must be included in one fractal." LuxAlgo's own build exposes the input under the name "Periods".
Changing that count changes what counts as a swing, and it changes two things at once. A wider flank marks fewer and larger turns, and it also pushes the confirmation further into the future, because more bars have to close on the right. LiteFinance publishes three-bar and seven-bar variants and rates them, saying "three candlesticks compared to five are considered a weak signal", with no test behind the rating.
So if a page offers you a best setting, ask what it tested. None of the guides tested any bar count.
How do you use fractals with the Alligator?
The common version of this rule and the vendor's own version are not the same rule, and the difference is whether it governs getting in or getting out.
MetaTrader's help file makes it about closing: "The Fractal signals need to be filtrated with the use of Alligator. In other words, you should not close a buy transaction, if the fractal is lower than the Alligator's Teeth, and you should not close a sell transaction, if the fractal is higher than the Alligator's Teeth. After the fractal signal has been created and is in force, which is determined by its position beyond the Alligator's Mouth, it remains a signal until it gets attacked, or until a more recent fractal signal emerges."
Every one of these guides describes the same pairing as an entry filter instead. FXSSI: "if you want to open a Buy position, it's necessary that the fractal located above the red line (the so-called "Alligator's Teeth") is broken out. The author of the strategy recommended to enter the market right after breaking the fractal up or with a pending Buy Stop order."
LiteFinance turns the filter round the other way entirely, making the fractal the confirming tool rather than the confirmed one: "Bill Williams advised using the fractal indicator to confirm signals generated by the Alligator indicator in trend strategies."
All three cite Williams. None quotes a passage. If you are going to use the pairing, pick one version, write it down, and test that one, because they are different rules and they will not produce the same trades.
How do you use fractals for entries and stops?
The rule you will see most often is a breakout of the last fractal's price, with the stop behind the opposite one. These are the sources' own words, with no suggestion from us that the rule works.
The trigger, per FXSSI: "the price movement for at least one point above or below the level of the previous fractal indicates breakout of this level by the price", and in practice "traders place pending Stop orders a few points above or below the fractal level to open a position in case of this level breakout".
The stop, same page: "Stop Loss is set at the level of the second-to-last opposite fractal". FBS puts it one fractal closer: "opening a sell trade you may place your stop loss at the last up fractal (alternatively, if you buy, your stop loss will be at the level of the last down fractal)".
LuxAlgo summarises Williams' own version in one sentence: "Williams' own rule was a stop order placed just beyond the most recent fractal, taken only when the fractal sat on the correct side of his Alligator, with signals on the wrong side ignored."
Has anybody tested it?
Not in anything published. None of these guides reports a trade count, a hold time or a result for any of those rules. The only counting of any kind is Phemex noting on a single Bitcoin chart that "the indicator also sent two false signals".
That is the whole evidence base for a marker that has shipped inside MetaTrader for years. The question is answerable, though: the definition is mechanical and public, so any tool using it marks the same bars, and anyone willing to count can settle it for their own instrument.
Where to find fractals: MT4, MT5, TradingView and other platforms
| Platform | How you get fractals | What you can change |
|---|---|---|
| MetaTrader 4 and 5 | Built in, in the Bill Williams group of technical indicators | Nothing on the built-in. The programming reference lists a symbol and a timeframe and no other input |
| TradingView | Built in, as the Williams fractal indicator | The number of candlesticks in one fractal. Its own help page says you "can alter and edit the indicator settings to include the number of candlesticks you'd like in one fractal" |
| LuxAlgo | Its Vela platform ships what the page calls "the standard fractal" alongside the Alligator | A "Periods" input |
| Downloadable MetaTrader builds | Third-party files you install yourself | Usually a bar count, as FXSSI describes |
| ChartLabs | Built in, as Williams Fractals under Standard in the chart's Indicators menu | Periods, the number of bars on each side, 2 by default |
Using a build whose rule you can read means you own the definition instead of trusting a download whose source you cannot see. That matters more here than for most indicators, because the whole question is whether a given build waits for its right-hand bars to close. Ours is set out near the top: strict on ties, marked on the fractal bar, and never marked before the confirming bars have closed.
How would you test whether a fractal rule does anything?
Write the rule down completely, step the chart forward one bar at a time, and count what happens. A written fractal rule needs these pieces before it can be counted:
- The bar count, since a three-bar flank and a seven-bar flank mark different swings.
- The confirmation bar. State that the fractal counts only once both of its right-hand bars have closed. This is the piece that gets silently dropped, and dropping it is what makes a bad test look good: you end up trading a level you could not have seen yet. That is the mistake FXSSI warns about.
- The trigger. A close beyond the fractal's price, or a stop order some fixed distance beyond it, measured the same way every time.
- The filter, if you are using one, and which of the three Alligator versions it is.
- The stop and the exit, including which opposite fractal the stop sits behind.
- The size, fixed as a percentage of the account rather than decided in the moment.
Then step forward. Replay in ChartLabs runs bar by bar, daily charts included, and changing timeframe mid-playback carries on at the new one. Historic trades snap to candle boundaries and respect your chart's timeframe, which matters when the whole rule hangs on which bar closed first. Your timezone setting changes the times shown, not how bars are grouped. Commission and slippage can be set per symbol so each trade's P&L reflects real costs, because a rule that places stop orders a few points beyond a level is exactly the kind that costs can erase.
Record every occurrence, not just the ones that worked. Look at the count first: a five-bar pattern on daily bars gives you a modest number of trades per market per year, so a single pair over six months will not tell you anything either way.
For the method itself, start with our beginner's guide to backtesting a trading strategy, and if you are testing on currencies, forex backtesting covers the session and spread effects that will change your results.
Start
Pick a bar count, write the confirmation rule into the test, and step through a few hundred bars of cleaned tick data from Dukascopy. Start the free trial.
Related Topics
Related
Backtesting a Trading Strategy: A Beginner's Guide
What backtesting is, why it matters, and how to run one step by step: defining your rules, choosing clean historical data, stepping through the chart trade by trade, logging results, and reading the metrics that tell you whether your strategy has a real edge.
Forex Backtesting: Test Your Strategy on Real Data
A practical guide to backtesting forex strategies: why session dynamics, spread variation, and pair-specific behavior change your results, what clean historical data actually means, and a five-step process for testing a strategy before you risk real capital.