Exp_Donchian_Channels_System
This EA trades Donchian Channel breakouts by reading signals from a custom Donchian Channels System indicator. It opens buy positions when the indicator signals an upward breakout and sell positions on downward breakouts, with configurable stop loss, take profit, and money management options.
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.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.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
This EA implements the classic Donchian Channel breakout strategy, going long when price breaks above the upper channel and short when it breaks below the lower channel. Entry conditions are determined by the custom Donchian_Channels_System indicator's buffer 8: a buy signal triggers when Col[1]>2 and Col[0]<3, while a sell signal triggers when Col[1]<2 and Col[0]>1. Exit conditions include closing positions on reverse signals and using fixed stop loss (1000 points) and take profit (2000 points), yielding a risk-reward ratio of 2:1. Position sizing supports five money management modes: percentage of free margin, percentage of balance, percentage of free margin minus floating loss, percentage of balance minus floating loss, and fixed lot size. The EA employs a new bar detection mechanism to avoid duplicate signals, recalculating trade signals only on each new bar to prevent repeated entries on the same candle.
Strengths
- Uses the classic Donchian Channel breakout strategy with clear, proven logic validated by the Turtle Trading methodology
- Stop loss of 1000 points and take profit of 2000 points provide a 2:1 risk-reward ratio, favorable for long-term positive expectancy
- Supports five position sizing modes, offering flexibility for different risk preferences and account sizes
- New bar detection mechanism effectively prevents duplicate entries on the same candle
- Buy and sell direction open/close can be independently toggled, allowing flexible trading control
Weaknesses
- Fixed stop loss of 1000 and take profit of 2000 points are large values unsuitable for short-term traders and lack ATR-based adaptive adjustment
- No position scaling logic — only all-in/all-out mode, unable to pyramid into trends gradually
- Depends on a custom indicator file; if the indicator file is missing, the EA fails to initialize, reducing portability
- No position count limit, potentially opening multiple same-direction positions during extreme market conditions
- Signal logic uses magic numbers (1, 2, 3) without comments, resulting in poor readability and maintainability
Possible improvements
- Replace fixed stop loss/take profit with ATR-based dynamic calculation for automatic adaptation to market volatility
- Add position count checks and maximum simultaneous position limits to prevent over-exposure
- Add detailed comments for magic numbers in indicator buffer logic, or replace them with named enum constants for readability
Risk assessment
Overall risk: Medium
- Fixed stop loss/take profit points are not volatility-adaptive; stop may be too large in low-volatility markets and take profit too small in high-volatility markets
- No maximum position count limit or capital risk ceiling check, potentially leading to over-exposure during extreme conditions
- Stop loss of 1000 points may be excessively large for some instruments, causing single-trade losses beyond account tolerance
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio, controls trade lot size |
MMMode | LOT | Lot calculation mode: Fixed lot or margin-based ratio |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage in points |
BuyPosOpen | true | Allow buy positions |
SellPosOpen | true | Sell position opening signal mode |
BuyPosClose | true | Allow close buy positions |
SellPosClose | true | Sell position closing signal mode |
InpInd_Timeframe | PERIOD_H4 | CandlesticksBW indicator timeframe |
DonchianPeriod | 20 | Donchian channel period |
Extremes | HIGH_LOW | Extremes calculation method (High/Low, incl. Open, incl. Close, etc.) |
Margins | -2 | Channel offset parameter |
Shift | 2 | Indicator bar shift offset |
SignalBar | 1 | Signal bar index (0=current, 1=last closed bar) |
Similar Breakout EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.