Exp_XMA_Ichimoku_Channel
This EA trades breakouts of the XMA Ichimoku Channel, buying when price closes above the upper channel border and selling when price closes below the lower channel border. It uses customizable smoothing methods (SMA, EMA, JJMA, etc.) to construct the channel from averaged high/low prices with percentage-based band offsets. Exit signals are generated when price re-enters the channel after a breakout.
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 | — | — | — | — | — | Run error |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Run error |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Run error |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Run error |
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 core concept of this strategy is breakout trading based on the XMA Ichimoku Channel, which is constructed by smoothing high/low price time series with configurable algorithms and adding percentage-based upper and lower band offsets. Entry conditions: a buy signal is generated when the close price breaks above the upper channel border (confirmed by the previous bar's close being at or below the upper border), and a sell signal is generated when the close price breaks below the lower channel border (with similar confirmation logic). Exit conditions: when holding a long position and price re-enters the channel, a close-long signal is triggered; similarly for short positions when price rises back into the channel, plus fixed stop loss and take profit levels in points. Position sizing is controlled via the MM parameter, where negative values represent fixed lot sizes and positive values represent deposit share-based lot calculation. Money management relies on the external TradeAlgorithms.mqh library for actual trade execution, including maximum slippage control via the Deviation parameter. The strategy evaluates signals only on new bar formation or when SignalBar is 0, preventing redundant per-tick calculations.
Strengths
- Channel breakout logic is clear with a confirmation mechanism (previous bar must not have already broken out), reducing false breakouts
- Supports multiple smoothing algorithms (SMA/EMA/JJMA/JurX/T3/VIDYA/AMA), offering high flexibility
- New bar detection prevents per-tick redundant calculations, reducing resource usage and duplicate trades
- Buy and sell directions can be independently enabled/disabled, providing flexibility
- Has separate stop loss, take profit settings and slippage control
Weaknesses
- Many channel parameters (smoothing method, depth, phase, percentage offset) create large optimization space prone to overfitting
- Breakout strategy suffers frequent stop losses in ranging markets, lacking a market state filter
- No spread filter, which may cause slippage losses in low-liquidity markets
- Signal confirmation logic is weak, relying only on the previous bar's close price position to validate breakouts
- No trailing stop feature; fixed stop loss/take profit cannot adapt to changing market volatility
Possible improvements
- Add a market state filter (e.g., ADX or ATR) to reduce trade frequency or pause trading in ranging markets
- Add a trailing stop mechanism that dynamically adjusts stop loss based on ATR to lock in more profits during trending markets
- Add a spread filter to pause new positions when the bid-ask spread is too wide
- Add volume or volatility confirmation to improve breakout signal reliability
Risk assessment
Overall risk: Medium
- Breakout strategy tends to generate consecutive losing signals in ranging markets
- Fixed stop loss/take profit does not account for market volatility changes, potentially resulting in insufficient stops or premature take profits during extreme conditions
- Lacks position check logic, may repeatedly open positions when existing positions are already held
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | -0.1 | Money management parameter controlling lot size or margin ratio |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum slippage deviation in points |
BuyPosOpen | true | Allow opening long positions |
SellPosOpen | true | Allow opening short positions |
BuyPosClose | true | Allow signal-triggered long position closing |
SellPosClose | true | Allow signal-triggered short position closing |
InpInd_Timeframe | PERIOD_H4 | Indicator calculation timeframe |
Up_period | 3 | Period for high price calculation |
Dn_period | 3 | Period for low price calculation |
Up_mode | HIGH | Time series type for high price search |
Dn_mode | LOW | Low price search time series type |
XMA_Method | MODE_SMA | Smoothing method |
XLength | 100 | Smoothing depth |
XPhase | 15 | Smoothing parameter (JJMA: -100~+100, VIDYA: CMO period, AMA: slow MA period) |
Up_percent | 1.0 | Upper band deviation percentage |
Dn_percent | 1.0 | Lower band deviation percentage |
SignalBar | 1 | Bar index for signal retrieval |
Similar Breakout EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.