A Bill Williams fractal is a set of five candles in which the middle one sticks out above its neighbors. There are dozens of them on any chart, and the rule for trading them is simple: if the price breaks the last fractal to the upside, you buy. I tested the classic variant on seven markets over 72 months, and there is almost no profit there. But in one market the idea worked consistently and held up through two years of data that the optimizer never saw. It is a robot for USDJPY on H4: below you will find its results, real trades on the chart, and how to download it for free.
- +203.5% in 72 months on USDJPY H4 with 1% risk per trade. Maximum drawdown: 7.3%.
- +47.3% in the forward test (10/2024–09/2026) with a profit factor of 1.96: the robot made money on data it did not see during tuning.
- With 2% risk per trade, the same robot returned +788.7% in 72 months with a 14.3% drawdown.
- In the archive: the robot ready for MetaTrader 5, the parameter file for USDJPY H4, and the instructions. It takes 5 minutes to get running.
📊 Download the «Williams Fractals» robot for free

What the robot does
Bill Williams described fractals in his books «Trading Chaos» and «New Trading Dimensions». A bullish fractal is a candle whose high is above the highs of the two candles to its left and the two to its right; the bearish one is the mirror image, using the lows. Williams proposed placing the order one point above the bullish fractal: if the price breaks it, buyers have overcome the last local high. The robot takes this idea and strips out what got in the way in the historical data:
- Entry: a buy stop pending order 1 point above the last bullish fractal that price has not yet broken. The order is moved on every new H4 candle.
- Buys only. On USDJPY the robot does not open sells on the breakout of a bearish fractal.
- Stop: behind the last bearish fractal, but no farther than 2 ATR and no closer than 0.5 ATR from the entry. If the stop ends up too wide, the robot trims it to 2 ATR.
- Take profit: 2 stops. Until it is reached, the stop is raised behind each new bearish fractal, so a winning trade does not turn into a losing one.
- Position size: based on a percentage risk of the balance. In the test it was 1%; in the parameters you can set your own.
The Alligator’s Teeth filter, which Williams considered mandatory, is turned off in this version: on USDJPY H4 it eliminated more good entries than bad ones. 48% of trades close in profit, and the average win is roughly double the average loss.
What it looks like on the chart
Below are two real trades by the robot in the USDJPY H4 test. Both are from the forward period, which the optimizer did not see: one winner and one loser. The gray triangles are the fractals; the fractal whose breakout opened the trade is marked in yellow. The red line is the Alligator’s Teeth, for reference.

Winning trade. On July 29, 2025, a bullish fractal formed on H4 with a high near 148.81. The robot placed a buy stop one point above it, and on July 30 the price broke it: buy at 148.809, stop at 148.155, take profit at 150.117, twice as far as the stop. The next day the pair reached the take profit: +$462.

Losing trade. On September 3, 2025, the picture was similar: the price broke a recent bullish fractal and the robot bought at 148.944, with a stop at 148.003. But the breakout turned out to be false, and within a few hours the price came back and hit the stop: −$235, exactly 1% of the balance at that moment. These trades make up half of the total, and that is normal: the loss is limited in advance, and every trade that reaches the take profit covers two stops like this one.
Here is how to do it by hand: open USDJPY H4 and add the standard Fractals indicator. Find the last bullish fractal that the price has not yet broken and place a buy stop one point above its high. The stop goes below the last bearish fractal, but no farther than 2 ATR(14) from the entry; the take profit goes at twice the distance of the stop. While the trade is open, raise the stop below each new bearish fractal. Do not open sells.
Robot results: training and forward
To avoid fooling myself with overfitting, I split the history into two parts. The parameters are chosen using only 10/2020–09/2024. Then the robot takes its exam on 10/2024–09/2026, data the optimizer did not see. The test: MetaTrader 5 strategy tester, FxPro demo account with its quotes, spreads, commissions and swaps, $10,000 deposit, 1:500 leverage, «1 minute OHLC» mode, 72 months.

| Period (USDJPY H4) | Return | Profit factor | Max. drawdown | Trades |
|---|---|---|---|---|
| Training, 10/2020–09/2024 | +104.9% | 1.76 | 6.0% | 253 |
| Forward, 10/2024–09/2026 | +47.3% | 1.96 | 7.1% | 112 |
| All 72 months, 1% risk | +203.5% | 1.84 | 7.3% | 365 |
| All 72 months, 2% risk | +788.7% | 1.83 | 14.3% | 365 |
| Longest pause without a new high | ≈ 5 months (10/2021–03/2022) |
The forward test is what matters most here. On unseen data the profit factor did not drop but rose, from 1.76 to 1.96, and the drawdown stayed within 7%. And it is not a single lucky combination of numbers: of 142 profitable parameter sets in training, 125 also made money in the forward test. Neighboring parameters behave the same way: with the stop no farther than 1.5 ATR and a take profit of 3 stops, the forward test gave +62.7% with a profit factor of 2.13, and the same entry without raising the stop gave +52.9%. In the test the robot finished in positive territory every full year from 2021 to 2026. Speaking plainly about money: commissions took $989 over 72 months, and the swaps on USDJPY buys at FxPro were positive in the test and added $1,610. If the interest rate differential between the United States and Japan narrows, that extra will disappear.

📊 Download the robot and the parameters for USDJPY H4
Why the «internet» fractals don’t work and this robot does
First I ran the strategy exactly as Williams describes it: daily chart, order one point beyond the last fractal, with the condition that the bullish fractal is above the Alligator’s Teeth and the bearish one below; buys and sells; stop behind the opposite fractal and a dynamic stop with each new fractal, no take profit. Seven markets, 72 months:

| Instrument (D1) | Result | Profit factor | Max. drawdown | Trades |
|---|---|---|---|---|
| BITCOIN | +39.1% | 1.91 | 22.6% | 89 |
| USDJPY | +10.0% | 1.36 | 6.8% | 66 |
| GOLD | +0.2% | 1.01 | 17.2% | 39 |
| USDCHF | −3.1% | 0.89 | 16.1% | 67 |
| EURUSD | −5.5% | 0.78 | 11.3% | 73 |
| GBPUSD | −7.3% | 0.70 | 11.3% | 69 |
| WTI (oil) | −10.7% | 0.50 | 16.5% | 45 |
The classic version does not burn the deposit, but it does not make money either: four markets out of seven end up negative, and the bitcoin profit came almost entirely from a single trade in early 2021; on the chart it shows up as a single step. There are three reasons:
- Too few trades. On the daily chart fractals appear rarely: 40 to 90 trades in six years. One or two good or bad trades decide the whole result.
- No take profit. The stop rises with the fractals, but on D1 the next bearish fractal is usually far away. The price can reach the target, turn around, and give back almost all of the profit before the stop is hit.
- Sells against the trend, and swaps. Trades last for weeks. On EURUSD, GBPUSD and USDCHF, swaps took between $210 and $670 over six years, and sells on rising pairs like USDJPY only added up stops.
The robot that works differs in exactly these points: H4 instead of D1, five times more trades; a take profit of 2 stops, which locks in the profit before the reversal; and buys only, in line with the pair’s trend. The idea is the same: enter when the price breaks the last fractal. The robot is tuned only for USDJPY H4, and I advise against moving it to other markets without your own test.
The risks, plainly
- The robot only buys USDJPY. It makes money as long as the pair is generally rising or moving in wide waves. If the Bank of Japan strengthens the yen for a long time, buys on fractal breakouts will become losers, and then you need to stop the robot. The swap extra also depends on the interest rate differential.
- Half of the trades are stops. 48% of trades close in profit. The longest streak: 5 stops in a row in November–December 2023, about −$540. The longest pause without a new balance high: about 5 months (October 2021 to March 2022).
- Pending orders. The robot keeps a buy stop and moves it on every H4 candle. With news and after the weekend, the order can be filled with slippage; in the test this is only partly accounted for.
- 2% risk doubles the drawdown: 14.3% instead of 7.3%. I would start with 0.5–1% and raise the risk only after the robot has worked for you live.
Where to run it
The robot works in MetaTrader 5 with any broker that offers USDJPY. My test was done at FxPro. The other brokers in my ranking also work: RoboForex and Tickmill. Before putting the robot on an account, run it in your broker’s tester: it takes an afternoon and shows you how it behaves with your quotes, spreads and swaps. For it to work continuously, keep the platform on a VPS: the robot moves the pending order on every new H4 candle, and if the platform is off, the signal is lost.
Download the «Williams Fractals» robot for free
The robot is free for clients of the brokers in my ranking:
- Open a MetaTrader 5 account with one of the brokers above (or use the one you already have).
- Go to the Telegram bot with the button and send your account number.
- After verification, the bot sends you the file: the robot, the parameters for USDJPY H4, the classic Williams parameters for your own experiments, and the instructions.
📊 Download the robot for free on Telegram
My conclusion
Williams fractals in their classic form are an honest but empty system: on the daily chart it barely advanced in six years, and the only notable profit came from a good bitcoin trend. If you move the same idea to H4, trade only in the direction of the pair’s trend, and take profit at two stops, you get a robot that tripled the deposit on USDJPY in 72 months with a 7.3% drawdown, and on two unseen years gained 47.3% with a profit factor of 1.96. The forward test confirmed it, and the neighboring parameters behaved the same way; that is why I trust this robot. But remember: it bets on USDJPY rising, and half of its trades are stops. Protect your deposit: start with 0.5–1% risk.
Today I also analyzed the Bill Williams Alligator, the second tool of the same system. On USDJPY, the EMA crossover, the previous day breakout, Raschke’s «Holy Grail» and the Supertrend also passed the test. Other breakout strategies: Crabel’s NR7 and the inside bar breakout.
Why 72 months?
The market changes fundamentally every 3–5 years: the participants and the volatility change, and trends give way to ranges. That is why I do not run 10–20 year tests: they mix different markets into a single average figure. USDJPY is a good example. Since 2021 the pair has risen in wide waves, and upward fractal breakouts reached the target again and again. A 10–20 year test would mix this market with very different yen eras into a single average figure. You have to choose a strategy for the current market and change it when the market changes, and this applies to this robot too: if USDJPY enters a long decline, you need to stop it.
That is why I built my app «Find your strategy», in the browser or in Telegram. There you can test any idea on a history of up to 72 months, and every 2 weeks the app automatically runs tens of thousands of strategies and shows you the ones that work over the last 6, 12 and 36 months. It does not promise profits: it helps you notice in time that the market has changed.
Backtest results do not guarantee future results.
Sources
- Bill Williams: «Trading Chaos: Applying Expert Techniques to Maximize Your Profits» (Wiley, 1995), fractals, entry on a fractal breakout, and the Alligator’s Teeth filter.
- Bill Williams: «New Trading Dimensions: How to Profit from Chaos in Stocks, Bonds, and Commodities» (Wiley, 1998), the fractal as the first entry signal and the dynamic stop based on fractals.
- My own tests in MetaTrader 5 on the FxPro demo server, November 2026.
Where to trade
These are the brokers and exchanges I use that work with clients from Latin America. Always check that the service is available in your country, and start small.
Risk warning: CFDs, Forex and crypto derivatives carry a high risk of losing money due to leverage. This article is not investment advice.


