Range Bar Breakouts: Why Our "Discovery" Was Just a Placebo Effect

Rejected methods · 5 min

## What's the idea?

A beginner-friendly summary of the verification: “Range Bar Breakouts: Why Our “Discovery” Was Just a Placebo Effect”.

Breakout entry example (XAUUSD daily, real data): buy when price breaks above the recent high.

Breakout entry example (XAUUSD daily, real data): buy when price breaks above the recent high.

What’s the idea?

Today, we’re diving into a fascinating experiment with a common concept in algorithmic trading: range bars. Unlike traditional time-based bars (like a 15-minute bar, or M15, which always takes 15 minutes to form), range bars are built based on price movement. Think of it like this: instead of a camera taking a picture every 15 minutes, it only takes one after a certain amount of movement has occurred. This is often used for “denoising” – trying to filter out the irrelevant wiggles and focus on significant price action. Our strategy was a “long-only Donchian break” using these range bars. We took a standard M15 timeframe and converted it into “ATR bricks” – a specific type of range bar where each “brick” represents a fixed multiple of the Average True Range (ATR), a measure of market volatility. The Donchian break part simply means we’d enter a long trade when the price broke above the highest high of the last ‘N’ range bars, expecting a continuation of the trend.

How I tested it

The goal was to see if this range-bar-based Donchian breakout strategy could really give us an edge. I applied the strategy across several different currency pairs, using the M15 timeframe data as the base for building our ATR bricks. To measure success, we focused on the Profit Factor (PF). This is a super important metric in EA testing: it’s calculated as Gross Profit / Gross Loss. In other words, if your PF is 2.0, you make $2 for every $1 you lose – which sounds fantastic! Naturally, a PF greater than 1.0 means your strategy is profitable. All our results were calculated after accounting for trading costs.

What happened?

Initially, the results were incredibly promising! When tested on real market data, this range bar break strategy showed Profit Factors ranging from 2.0 to 2.7 across all the currency pairs we tried. To put this in perspective, typical M15 timeframe strategies often yield PFs in the range of 1.2 to 1.4. So, 2.0-2.7 looked absolutely stellar – almost too good to be true! Even traditionally “low-edge” pairs like EURUSD and AUDUSD, which are often difficult to find significant advantages in, showed similarly high PFs. This was our first red flag: when every market produces exceptional results, it starts to feel less like a market-specific edge and more like something else is at play. And then came the crucial test. We applied the exact same strategy to a random walk dataset. What’s a random walk? Imagine a market where price movements are completely random, like flipping a coin for every tick up or down. There’s absolutely no real edge to be found in a random walk; any strategy should, in theory, break even or lose money due to costs. It’s our ultimate “placebo” test. The results were mind-blowing: when run on the random walk, our strategy generated PFs of 3.2 to 3.75! Yes, you read that right. The strategy performed even better on a market with no real edge than it did on actual market data. This was the definitive proof: the high Profit Factor we observed was 100% a structural artifact. In plain English: the strategy wasn’t finding a hidden edge in the market; it was exploiting a quirk in how the range bars themselves were constructed and how trades were executed within them. Specifically, the combination of “close-formed range bars” and a Donchian break strategy inherently creates a kind of “look-ahead bias.” Because orders are often executed on the very bar that forms the brick, the strategy effectively “knew” about price movements slightly before it should have, leading to artificially inflated profits. Even trying to limit entries to one trade per brick couldn’t eliminate this fundamental flaw.

What I learned

This experiment delivered a powerful lesson: range bar (specifically, close-formed) break strategies are highly susceptible to being false positives. They can appear incredibly profitable, but the profitability often stems from a structural bias within the bar construction itself, rather than a genuine market edge. The biggest takeaway for any aspiring EA developer is this: any new strategy, especially one that involves “bar re-composition” (like range bars, Renko, Heikin-Ashi, etc.), must be rigorously validated against a random walk or placebo model. This “placebo test” is an indispensable tool for detecting these kinds of structural biases. It’s as crucial as other false positive detection methods we’ve explored in the past for different complex strategies. For our existing, verified trading systems, this research confirmed that no changes are needed, as they don’t rely on this type of range bar construction. But it’s a stark reminder: when something looks too good to be true in backtesting, it very often is! Always be skeptical, and always test for those hidden biases.

How this connects

This verification builds on earlier ones (what failed before and what I tried this time, comparisons between approaches).