Exp_XD-RangeSwitch
This EA trades based on the XD-RangeSwitch custom indicator, which identifies range breakouts by detecting peaks. It opens buy/sell positions when breakout signals appear and closes positions on opposite signals or trend reversals, with configurable trade direction (with or against the signal).
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 based on the XD-RangeSwitch indicator which detects price range breakout signals for trading. Entry conditions: a buy signal is triggered when the upward signal buffer (buffer 2 or 3) shows a non-empty value, and a sell signal is triggered when the downward signal buffer shows a non-empty value. Exit conditions: positions are closed when the trend buffer (buffer 0 or 1) shows a reversal, meaning long positions close when the uptrend disappears and short positions close when the downtrend disappears. Position sizing uses either fixed lots or deposit-percentage-based calculation controlled by the MM parameter and MMMode enumeration, supporting LOT and percentage modes. Money management controls the share of deposit per trade through the MM parameter (default 0.1), combined with configurable stop loss and take profit settings for risk control. The strategy also provides a counter-signal trading mode (FalshDirect) that swaps the indicator's up/down signals for reverse trading logic. A new bar detection mechanism ensures signals are only triggered after bar confirmation, preventing duplicate trades.
Strengths
- Supports both with-signal and against-signal trading modes for flexibility in different market conditions
- Complete stop loss and take profit settings for controlled risk
- New bar detection mechanism prevents duplicate trades on the same signal
- Independent buy/sell permission switches allow flexible long-only or short-only configuration
- Includes a recount mechanism that automatically retries when data is insufficient
Weaknesses
- Depends on the custom XD-RangeSwitch indicator; EA fails to run if the indicator file is missing
- No spread filter, which may result in unfavorable fills in high-spread environments
- Stop loss 1000 and take profit 2000 points are large and may not suit all instruments
- No position check logic before opening, potentially leading to duplicate positions
- Counter-signal mode (FalshDirect) may increase risk without additional risk controls
Possible improvements
- Add position check logic before opening to confirm no existing same-direction positions, preventing duplicates
- Add spread filter and maximum position count limit to improve trading safety
Risk assessment
Overall risk: Medium
- No position check before opening, potentially causing duplicate positions and excessive exposure
- Counter-signal trading mode may sustain losses when trends persist
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Deposit percentage per trade |
MMMode | LOT | Lot calculation method (fixed lot or proportional) |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum price deviation in points (slippage tolerance) |
BuyPosOpen | true | Allow opening long positions |
SellPosOpen | true | Allow opening short positions |
BuyPosClose | true | Allow closing long positions |
SellPosClose | true | Allow closing short positions |
Direct | FalshDirect | Trading direction (trend or counter-trend) |
InpInd_Timeframe | PERIOD_H4 | Indicator calculation timeframe |
N | 4 | Number of peaks |
SignalBar | 1 | Bar index for entry signal |
Similar Breakout EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.