EA-1049 · Breakout

TradeChannel

A price channel breakout EA that identifies support and resistance levels using a Donchian-style channel, then opens buy/sell positions when price breaks through these levels. It includes ATR-based stop loss, a martingale-like lot reduction after consecutive losses, and a simple trailing stop mechanism.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryBreakout
RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, H1, H4, D1
IndicatorsATR, Price Channel (Donchian)
AuthorInteger

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.00%0.00%0.00%0—————Not convertible yet

Why this EA never traded: no entry rule survived the conversion.

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.

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 EA uses a Donchian-style price channel with a configurable period (rChannel) to identify support and resistance levels. Entry signals come in two forms: first, when price breaks the channel boundary (high touching resistance for buy, low touching support for sell) with the current channel level matching the previous period's level, indicating channel stability; second, when the close price is inside the channel butbiases toward the pivot direction. Exit conditions mirror the breakout signals: closing longs when the high touches resistance, and closing shorts when the low touches support. Position sizing offers two modes: fixed lots or dynamic calculation based on a maximum risk percentage of free margin, with a DcF parameter that reduces lot size after consecutive losses. Stop loss is ATR-based: for buys it's support minus ATR, for sells it's resistance plus ATR plus the spread. The trailing stop feature moves the stop loss to breakeven or better once profit exceeds the Trailing parameter in points.

Strengths

  • ATR-based dynamic stop loss adapts to market volatility automatically
  • Includes stop loss protection and trailing stop functionality to lock in profits
  • Lot reduction mechanism after consecutive losses helps control drawdown risk
  • Channel breakout strategy logic is clear, easy to understand and tune parameters
  • Checks minimum stop level requirements before opening positions

Weaknesses

  • isCloseBuy and isOpenBuy share identical signal logic, causing a newly opened long position to potentially close on the very next bar
  • Symmetric entry/exit signals lack differentiation; no take-profit target, relying solely on stop loss and reversal signals for exits
  • The DcF lot reduction mechanism decreases size after losses rather than increasing, which is conservative but may miss recovery opportunities
  • Bug in defPcChannel: CopyLow return value check uses ==1 instead of ==-1, potentially missing data fetch failures
  • Missing spread filter and trading session filter, may result in unfavorable fills during low liquidity or high spread periods

Possible improvements

  • Differentiate entry and exit signal logic, e.g., use different channel periods or add confirmation conditions to avoid immediate close after open
  • Fix the CopyLow return value check bug in defPcChannel (change ==1 to ==-1), and add take-profit targets and spread filter
  • Add trading session filter and spread check to avoid opening positions under unfavorable conditions

Risk assessment

Overall risk: Medium

  • Identical entry and exit signals may cause frequent open-close cycles leading to commission losses
  • CopyLow return value check bug in defPcChannel may cause use of uninitialized data
  • No take-profit target means profits rely entirely on trailing stop or reversal signals, risking repeated stop-outs in ranging markets
  • Lot reduction after consecutive losses reduces risk but also diminishes recovery capacity

Evaluation scores

Code quality3.0
Strategy logic2.0
Risk management3.0
Robustness2.0
Innovation2.0
Documentation2.0
Overall2.3

Parameters

ParameterDefaultDescription
Lots0.1Order lot size; 0 uses MaxR for dynamic calculation
SndMltrueSend email notification on open and close
DcF3Lot decrease factor on loss; smaller = larger decrease, 0 = disabled
MaxR0.02Max risk ratio (0-1) of available funds, used when Lots is 0
pATR4ATR indicator period for stop loss distance calculation
rChannel20Price channel period for support and resistance calculation
Trailing300Trailing stop in points; 0 disables trailing stop

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.