Tunnel Method
The Tunnel Method EA identifies price tunnel or channel formations and trades breakouts from those defined ranges. It enters positions when price breaks above or below the tunnel boundaries, aiming to capture momentum-driven moves following periods of consolidation.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | -0.06% | -0.05% | 2.71% | 56 | 40.00% | -0.01 | -0.02 | 6 | −$0.71 | Reliable |
| GBPUSD | +0.16% | +0.14% | 4.68% | 63 | 38.70% | 0.06 | 0.03 | 6 | −$0.11 | Reliable |
| USDJPY | +2.94% | +2.55% | 4.00% | 63 | 50.00% | 0.70 | 0.73 | 4 | +$4.99 | Reliable |
| XAUUSD | -44.20% | -38.24% | 71.85% | 56 | 48.20% | -0.32 | -0.61 | 6 | −$78.92 | Reliable |
Profitable on 2 of 4 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 44% of 18 · GBPUSD: better than 56% of 18 · USDJPY: better than 71% of 17 · XAUUSD: better than 32% of 19
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 46% | +1.63% 2026-04 | -1.24% 2026-07 |
| GBPUSD | 54% | +3.09% 2026-03 | -1.85% 2026-01 |
| USDJPY | 54% | +2.24% 2026-07 | -2.22% 2026-03 |
| XAUUSD | 54% | +26.43% 2026-11 | -30.91% 2026-08 |
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
The core strategy of this EA is the tunnel breakout method, which waits for price to break above or below a defined price channel (tunnel) after a period of consolidation. Entry conditions are triggered when price closes beyond the tunnel boundaries — a breakout above the upper band initiates a long position, while a breakout below the lower band triggers a short. Exit conditions may include fixed take-profit and stop-loss levels, a reversal breakout of the tunnel, or ATR-based dynamic stops. Position sizing typically uses either fixed lot sizes or risk-percentage calculations based on account equity. Money management features depend on the parameter configuration but generally include risk ratio settings. The strategy is a classic range-breakout type that profits when trends emerge after consolidation, but it is vulnerable to consecutive losses in markets with frequent false breakouts.
Strengths
- Clear strategy logic based on classic channel breakout principles, easy to understand and verify
- Enters at the beginning of trend moves, capable of capturing large trending profits for significant gains
- Relatively simple parameters, making it easy for users to adjust and optimize strategy performance
Weaknesses
- False breakouts are the primary risk — price briefly breaking out then returning to the channel causes frequent stop-outs
- Lacks trend filtering mechanism, which may repeatedly trigger invalid signals in ranging markets leading to losses
- Position sizing is basic, without dynamic adjustment based on market volatility (e.g., ATR-based sizing)
Possible improvements
- Add a trend filter (e.g., higher timeframe MA or ADX) to avoid frequent trading in ranging markets
- Introduce ATR-based dynamic stop-loss and take-profit to adapt exit levels to market volatility
- Add breakout confirmation mechanisms (e.g., pullback confirmation after breakout or volume confirmation) to reduce false breakout risk
Risk assessment
Overall risk: Medium
- Risk of consecutive stop-outs from false breakouts, especially in narrow ranging markets
- Lack of multi-position checks may lead to duplicate orders increasing risk exposure
- Fixed stop-loss may be insufficient to cover slippage risk during volatile market conditions
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
TunnelPeriod | 20 | Tunnel channel calculation period |
LotSize | 0.1 | Fixed trading lot size |
StopLoss | 50 | Stop loss in points (0=structure-based) |
TakeProfit | 100 | Take profit in points (0=structure-based) |
MagicNumber | 12345 | Close orders with specified magic number (-1=all) |
Timeframe | H1 | Trading timeframe |
Similar Breakout EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.