Exp_XMA_Range_Bands
This EA trades breakouts from the XMA_Range_Bands channel indicator. It opens buy positions when price closes above the upper band and sell positions when price closes below the lower band, with optional permissions for entry and exit. Positions are managed using fixed stop loss and take profit levels with configurable money management.
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
The core strategy of this EA is a breakout system based on the XMA_Range_Bands channel indicator. The XMA_Range_Bands consists of a moving average center line and upper/lower bands calculated from smoothed candle range multiplied by a deviation factor. Entry conditions trigger a buy signal when the close price breaks above the upper band from inside the channel, and a sell signal when the close price breaks below the lower band from inside the channel. The EA requires the previous bar's close to still be within the band to confirm a genuine breakout rather than an existing outside position. Exit conditions rely on fixed stop loss and take profit in points, while counter-breakout signals also trigger position closure — a break below the lower band closes longs, and a break above the upper band closes shorts. Position sizing is controlled by the MM parameter where negative values represent fixed lot sizes and positive values represent a share of the deposit. The strategy defaults to the H4 timeframe with configurable smoothing algorithms (SMA, JJMA, etc.), making it suitable for catching the early stages of medium-to-long-term trends.
Strengths
- Clear channel breakout logic with well-defined entry conditions suitable for trending markets
- Supports multiple smoothing algorithms (SMA, EMA, JJMA, JurX, T3, etc.) providing high adaptability
- Independent buy/sell entry and exit permission controls offer flexible directional trading
- Breakout confirmation requiring the previous bar to still be inside the band reduces false breakout risk
- Uses IsNewBar detection to prevent repeated entries within the same bar
Weaknesses
- Fixed stop loss and take profit in points without ATR-based dynamic adjustment may be unsuitable across varying market conditions
- No position check logic exists, potentially leading to duplicate entries in the same direction
- Lacks spread filter and volatility filter, prone to frequent false breakout losses in narrow ranging markets
- MM parameter has different meaning for positive vs negative values but lacks input validation,easilymisconfiguration
- No trailing stop or dynamic take profit mechanism to maximize profits during trending moves
Possible improvements
- Add position check to prevent duplicate entries in the same direction and allow maximum position count limits
- Replace fixed SL/TP with ATR-based dynamic calculation to adapt to varying market volatility
- Add channel width filter or ADX trend strength filter to suppress trading during narrow ranging conditions
Risk assessment
Overall risk: Medium
- No position check may lead to duplicate same-direction entries increasing risk exposure
- Fixed point stop loss may be insufficient in extreme volatility conditions or too tight for high-volatility instruments
- Breakout strategy tends to produce consecutive losses in ranging/choppy markets
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | -0.1 | Deposit fraction or fixed lot; negative value = lot size |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum price slippage |
BuyPosOpen | true | Allow buy position open |
SellPosOpen | true | Allow sell position open |
BuyPosClose | true | Allow close long position |
SellPosClose | true | Allow close short position |
InpInd_Timeframe | PERIOD_H4 | Indicator timeframe |
MA_Method1 | MODE_SMA | Moving average smoothing method |
Length1 | 100 | Moving average smoothing depth |
Phase1 | 15 | Moving average smoothing parameter |
MA_Method2 | MODE_JJMA | Bar amplitude smoothing method |
Length2 | 20 | Bar amplitude smoothing depth |
Phase2 | 100 | Bar amplitude smoothing parameter |
Deviation | 2.0 | Channel expansion ratio |
IPC | PRICE_CLOSE | Price constant for indicator calculation |
SignalBar | 1 | Bar index for entry signal |
Similar Breakout EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.