Breakout Adaptive
- Experts
-
Alexandre Vincent Traber
Algorithmic trading developer building Expert Advisors for MetaTrader 5. - Version: 1.0
Breakout Adaptive is a Donchian channel breakout EA with ATR-based risk, tiered profit-taking, breakeven and trailing exit management, profit-giveback protection, and a loss-streak adaptive position sizing engine designed to smooth the equity curve and reduce drawdown depth after losing streaks.
How it works
- Detects breakouts of the highest high / lowest low over a configurable Donchian lookback.
- Enters on confirmed close beyond the channel, with ATR-based stop loss.
- Closes partial volume at Tier 1 (R multiple), moves stop to breakeven.
- Closes partial volume at Tier 2 (R multiple).
- Trails the remaining runner with ATR-based stop after Tier 2.
- Closes the position if profit retraces beyond a configurable % of its peak R (giveback protection).
- Reduces risk multiplier after consecutive losses, restores it gradually after wins.
Inputs
Trading
- Magic Number
- Order Comment
- Max Spread Points
Signal (Donchian)
- Donchian Period
Risk & Sizing
- Risk Percent
- Use Compounding
- ATR Period
- ATR SL Multiplier
Adaptive Risk (Recovery)
- Adaptive Enable
- Adaptive Loss Step %
- Adaptive Win Step %
- Adaptive Min Risk Multiplier
- Adaptive Max Risk Multiplier
Exit Management (Tiers)
- Tier1 RR
- Tier1 Close %
- Tier2 RR
- Tier2 Close %
- Breakeven Buffer Points
- Trail ATR Multiplier
Profit Giveback Protection
- Giveback Enable
- Giveback Min Profit R
- Giveback %
Optimizer Score
- Score Min Profit Factor
- Score Max Drawdown %
- Score Min Trades
- Score R2 Weight
- Score Slope Weight
- Score Split Penalty
- Score Skew Penalty
- Score Ulcer Penalty
- Score MAR Weight
- Score Trade Bonus Weight
Optimizer scoring system
Breakout Adaptive includes a custom OnTester scoring function built to reject curve-fitted optimization runs. It disqualifies any result with negative profit, low profit factor, excessive drawdown, or too few trades, then ranks the rest by equity curve smoothness (R²), profit speed (slope), and capital efficiency (MAR ratio), penalized by temporal instability (split-half R² divergence), single-trade profit concentration (skew), and drawdown pain (Ulcer Index). Set Optimizer Criterion to Custom max before running any optimization.
Recommended setup
Recommended symbols, timeframes and modeling mode are shown in the screenshots, with the corresponding .set file listed in each screenshot's comment.
Screenshots
See attached screenshots for recommended symbol/timeframe combinations and their .set files.
Disclaimer
Past performance shown in backtests and screenshots does not guarantee future results. Test on a demo account before live use. Trading involves risk of loss.
