EA-15907 · Breakout

Exp_DarvasBoxes_System

This EA implements the Darvas Boxes trading system, which identifies box-shaped trading ranges and trades breakouts from those ranges. It uses the custom DarvasBoxes_System indicator to detect upward and downward breakout signals, then opens buy or sell positions accordingly. The system includes configurable money management, stop loss/take profit, and separate controls for opening and closing positions on both sides.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryBreakout
RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsDarvasBoxes_System
Author—

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD+4.27%+3.70%4.40%1542.90%0.760.973+$25.62Reliable
GBPUSD-2.25%-1.96%8.15%2331.80%-0.26-0.286−$9.55Reliable
USDJPY0.00%0.00%0.00%0—————No trades
XAUUSD0.00%0.00%0.00%0—————No trades

Profitable on 1 of 2 markets with reliable results.

Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.

Against the other Breakout EAs with a reliable result on the same market: EURUSD: better than 89% of 18 · GBPUSD: better than 22% of 18

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD54%+2.81% 2026-09-1.94% 2026-04
GBPUSD31%+3.77% 2026-02-2.84% 2026-01

From the backtest equity curve, sampled about every two days; only reliable results.

Blow-up risk: No blow-up pattern found

None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.

High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →

Strategy analysis

This EA is based on the Darvas Box theory, a classic breakout trading strategy proposed by Nicolas Darvas. The strategy identifies box-shaped trading ranges through the DarvasBoxes_System custom indicator and trades breakouts from those ranges. When price breaks above the box top, a buy signal is generated (Col[1]>2 and Col[0]<3), and when price breaks below the box bottom, a sell signal is generated (Col[1]<2 and Col[0]>1). Entry conditions rely entirely on the indicator's buffer values, where buffer index 6 provides signal data with Col[1] determining breakout direction and Col[0] confirming breakout strength. For exits, the EA uses fixed stop loss and take profit levels (default 1000 and 2000 points respectively), and also actively closes positions when opposing breakout signals appear. Position sizing supports multiple modes through the MM parameter and MMMode enumeration, including percentage of free margin, balance, margin after deducting losses, and fixed lot size. The EA implements a new bar detection mechanism to avoid duplicate signals and allows users to select the signal trigger bar via the SignalBar parameter.

Strengths

  • The Darvas Box is a classic and well-validated breakout strategy with clear and reliable logic
  • Multiple money management modes provide flexibility to suit different risk preferences
  • Independent control of buy/sell opening and closing enables fine-grained strategy management
  • New bar detection mechanism prevents duplicate position openings on the same bar
  • Using completed bars (SignalBar=1) as signal source reduces false signals

Weaknesses

  • Complete dependency on the custom DarvasBoxes_System indicator whose algorithm is opaque and not auditable
  • Fixed stop loss and take profit in points without considering market volatility (e.g. ATR), which may be unsuitable across different market conditions
  • Lacks position scaling logic (add/reduce), making position management relatively simplistic
  • No spread filter or trading session filter, potentially leading to unfavorable fills during high spread or low liquidity periods
  • Signal judgment uses hardcoded numeric thresholds (2 and 3), lacking adaptability to changing market conditions

Possible improvements

  • Add ATR-based dynamic stop loss and take profit to adapt risk management to changing market volatility
  • Add spread filter and trading session filter to avoid entries during unfavorable trading conditions

Risk assessment

Overall risk: Medium

  • Dependency on a custom indicator with unauditable logic means signal reliability cannot be independently verified
  • Fixed stop loss/take profit without volatility consideration may result in frequent stop-outs during high volatility periods
  • Lack of spread filter may cause significant slippage during low liquidity periods

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness3.0
Innovation2.0
Documentation1.0
Overall2.5

Parameters

ParameterDefaultDescription
MM0.1Money management ratio or lot size, depends on MMMode setting
MMModeLOTPosition sizing: free margin/balance/post-loss balance ratio or fixed lots
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum allowed slippage
BuyPosOpentrueAllow buy to open
SellPosOpentrueAllow sell to open
BuyPosClosetrueAllow buy to close
SellPosClosetrueAllow sell to close
InpInd_TimeframePERIOD_H4DarvasBoxes_System indicator timeframe
symmetrytrueBox symmetry parameter
Shift2Indicator offset
SignalBar1Signal bar index, 0=current bar, 1=completed bar

Similar Breakout EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.