Blog / Strategy
Strategy

Darvas Box 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 Darvas Box Breakout is a pure price-action breakout strategy that revives Nicolas Darvas's classic "box" theory using nothing but raw OHLC (Open, High, Low, Close) data — no moving averages, no oscillators, and no lagging indicators of any kind. A "box" is simply a horizontal price range, defined by a recent swing high (the box top) and a recent swing low (the box bottom), inside which price has been consolidating. The strategy watches for the moment price closes decisively beyond one of those edges, which it treats as a potential breakout from the consolidation.

This approach is designed for trending or range-then-trend market conditions, where price often pauses inside a tight range before resuming a directional move. The core idea — borrowed from Darvas, a 1950s dancer-turned-trader who tracked stock prices by telegram — is that genuine consolidations (boxes that have "settled" and held their boundaries) frequently precede meaningful expansions in price. The strategy only acts on boxes that have matured, deliberately ignoring ranges that are still actively forming or that look more like an in-progress trend leg than a true pause.

As a learning tool, the Darvas Box Breakout is well suited to traders who want to understand structure-based, indicator-free trading. Because every decision is derived from visible price levels — swing extremes, box height, and an average-range volatility proxy — it offers a transparent way to study how breakouts, structural stop placement, and reward-to-risk targeting fit together. Treat this article as a strategy analysis and an educational walkthrough, not a profit opportunity.

How It Works

The strategy evaluates its logic once per completed bar (it ignores the still-forming candle). On each newly closed bar, it rebuilds the box from recent history and checks whether that bar broke out. Here is the logic in plain English:

Once a valid, mature, tight box is identified, the strategy signals an entry as follows:

Because exits are fully defined by the structural stop and the reward-based target at entry, the strategy never relies on a discretionary close — every trade has its risk and reward mapped out the moment it opens.

Darvas Box Breakout MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
BoxLookback 20 8 60 Number of bars used to form the box (the swing high/low range preceding the trigger bar). Larger values build wider, longer-term boxes.
MinHoldBars 3 1 12 How many bars an extreme must have held before the trigger bar for the box to count as a settled consolidation. Higher values demand more maturity.
RangePeriod 14 5 40 Number of bars used to compute the average bar range, the price-action volatility proxy.
MaxBoxRange 3.0 1.0 8.0 Maximum allowed box height as a multiple of average range. Lower values restrict trades to tighter consolidations.
BufferMult 0.10 0.0 1.0 Breakout and stop buffer expressed as a fraction of average range. Larger values require a more decisive close beyond the box edge.
Reward 2.0 0.5 5.0 Reward-to-risk multiple for the take-profit. A value of 2.0 sets the target at twice the stop distance.
Lots 0.10 0.01 1.0 Order volume (position size) in lots.
Darvas Box Breakout MT5 EA — MQL5 source code

Recommended Chart Settings

The Darvas Box Breakout is a structural, swing-oriented strategy, so it is generally studied on the H1 (1-hour) or H4 (4-hour) timeframes, where consolidation boxes are clear and breakouts are less prone to intrabar noise. It can be applied to liquid instruments such as major forex pairs (for example EUR/USD or GBP/USD), major indices, or commodities — any market that tends to range and then trend.

Because the logic is derived entirely from price structure, it adapts to whatever instrument and timeframe you attach it to, but the behavior of boxes differs considerably across markets and sessions. Results will vary across different symbols, timeframes, and market conditions, and the default parameters are a starting point for study rather than a tuned configuration. Always test any settings on historical and demo data before drawing conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Like every approach, the Darvas Box Breakout has clear strengths and equally clear limitations, and an honest assessment matters more than enthusiasm.

Strengths. The logic is transparent and entirely price-based, which makes it easy to study and to reason about — there are no hidden indicator calculations. The maturity and tightness filters are thoughtful: by requiring a box to hold for several bars and to stay tight relative to recent volatility, the strategy attempts to avoid chasing ranges that are still forming. Every trade has a predefined structural stop and a fixed reward-to-risk target, which enforces disciplined risk planning.

Known limitations. Breakout strategies are vulnerable to false breakouts (or "fakeouts"), where price briefly closes beyond a box edge and then reverses back into the range. In choppy, sideways markets without follow-through, this can produce a series of losing trades as boxes break and fail repeatedly. The structural stop on the far side of the box can also be relatively wide on larger boxes, which affects position sizing. And because the strategy trades only one position at a time and waits for completed bars, it may miss fast moves or enter a breakout slightly late.

Where it may underperform. Tightly oscillating, low-volatility ranges and news-driven whipsaws are the toughest conditions for any breakout method. The strategy historically performs best when a genuine consolidation is followed by sustained directional expansion — a condition that is never guaranteed to occur. Use it as a framework for understanding breakout structure, and validate its behavior thoroughly before relying on it.

Risk Management Tips

Sound risk management matters far more than any single entry signal. Consider these general educational 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