Blog / Strategy
Strategy

Compression Bias Breakout

Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.

What Is This Strategy?

The Compression Bias Breakout is a volatility-compression breakout strategy that uses the Close-Location-Value (CLV) footprint to decide its trade direction before price actually breaks out of a range. In plain terms, it watches for a market that has coiled into a tight sideways box, reads which side is quietly building pressure inside that box, and then only takes the breakout that agrees with that hidden pressure. It is a breakout/momentum style system designed to run on liquid instruments such as EURUSD, GBPUSD, or a metal like gold on the M15 to H1 timeframes.

Most naive range-breakout systems fire on the first candle that closes outside a box, and they get repeatedly chopped up by "false breaks" — the box breaks one way, then snaps back the other. This strategy tries to filter those out. The core idea borrows from Wyckoff-style accumulation and distribution analysis: while price grinds sideways, one side is often quietly absorbing supply. Candles that keep closing near their high during a tight range betray hidden buying (accumulation), while candles closing near their low betray hidden selling (distribution). The Close-Location-Value measures exactly where each bar closes within its own range, on a scale from -1 (closed on the low) to +1 (closed on the high).

As a learning tool, the Compression Bias Breakout is well suited to traders who want to study how order flow context can be layered on top of a simple price pattern. It is not a "set and forget" money machine, and this article does not present it as one. Instead, it is a clean, self-contained example of combining three classic concepts — a volatility squeeze, a directional footprint, and a decisive breakout trigger — into one rule set that adapts to any symbol or timeframe because everything is measured relative to the Average True Range (ATR), a standard measure of recent volatility.

How It Works

The strategy evaluates its rules once per newly-closed bar (it does not repaint), and it only ever holds one position at a time per magic number. When flat, it walks through the following checks:

The strategy signals a long when the coil was accumulating (bias ≥ +threshold) and the signal bar closes decisively above the box high in the upper half of its range. It signals a short when the coil was distributing (bias ≤ −threshold) and the signal bar closes decisively below the box low in the lower half of its range. Crucially, breakouts that fire against the footprint — the classic bull trap or bear trap — are skipped entirely.

Exits are handled entirely by fixed ATR-based brackets set at entry:

With the defaults, the target is twice the distance of the stop, giving a nominal 2:1 reward-to-risk framework on each trade. There is no trailing logic — once in a trade, the position runs until it hits either the stop or the target.

compression bias breakout MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
CompressWindow 20 8 60 Number of closed bars that form the compression box and the CLV footprint.
AtrPeriod 14 5 40 ATR lookback used for the squeeze gate, break buffer, and risk sizing.
SqueezeAtrMult 3.0 1.5 8.0 Box must be no taller than this multiple of ATR to count as compressed.
BiasThreshold 0.15 0.0 0.6 Minimum absolute average CLV over the box for a valid accumulation/distribution bias.
BreakBufferAtr 0.10 0.0 1.0 Signal close must clear the box edge by this multiple of ATR (decisive break).
StopAtrMult 1.8 0.5 5.0 Stop-loss distance as a multiple of ATR.
TargetAtrMult 3.6 1.0 10.0 Take-profit distance as a multiple of ATR.
Lots 0.10 0.01 1.0 Trade volume in lots.
Magic 5417 0 9,999,999 Magic number used to identify and manage this EA's positions.
compression bias breakout MT5 EA — MQL5 source code

Recommended Chart Settings

The Compression Bias Breakout was designed for liquid FX pairs such as EURUSD or GBPUSD, or a metal like gold, on the M15 to H1 timeframes. Because every threshold is expressed relative to ATR and market structure rather than fixed pip or point values, the logic can adapt to different symbols and timeframes without hard-coded constants. That said, tighter, more liquid instruments tend to produce cleaner compression boxes and fewer erratic false breaks, which is why they make a sensible starting point for study.

Keep in mind that results will vary considerably across different market conditions. A quiet, range-bound session provides the kind of coil this strategy is built to read, while a fast, news-driven or gapping market can produce breakouts that behave very differently from the historical patterns the logic assumes.

How to Install on MetaTrader 5

What to Consider Before Using This EA

The strength of this approach is its selectivity. By demanding a genuine volatility squeeze, a persistent directional footprint, and a decisive break in that direction, the strategy is engineered to sidestep many of the aimless false breakouts that plague simpler box-breakout systems. The footprint-agreement filter is the distinguishing feature — it is an attempt to trade only when the breakout is "confirmed" by what happened inside the range beforehand.

However, that same selectivity is also a limitation. Because so many conditions must line up at once, the strategy may trade infrequently, and a low trade count makes it harder to judge its behavior with statistical confidence. The CLV footprint is a heuristic, not a guarantee — accumulation and distribution readings can be noisy, and a coil that "looks" accumulative can still resolve downward. Fixed ATR stops and targets do not adapt mid-trade, so a valid breakout that stalls and reverses will still take a full stop-loss.

This style of strategy also tends to underperform in choppy, low-volatility drift where boxes form but never break cleanly, and in violently trending or news-driven conditions where price gaps straight through both the box and the buffer. Whipsaw environments — where the market fakes one direction, triggers an entry, then reverses — remain the hardest case for any breakout logic, including this one. Treat it as a framework to study and stress-test, not a finished product.

Risk Management Tips

Regardless of how a strategy is designed, disciplined risk management matters more than any single entry rule. Consider the following general principles:

Risk Warning

Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.

Downloads

← Back to Blog