Switch Method
- Experts
-
Rikza Fauzan Nurfadilah
Professional provider of MQL5 MetaTrader 5 Expert Advisors (EAs). Help optimize your automated trading with proven, stable, and secure strategies. - Version: 1.20
- Activations: 10
SmartSwitch EA v1.0: Auto-Method Trading System for MetaTrader 5
SmartSwitch is an Expert Advisor (EA) for MetaTrader 5 that automatically selects a trading method based on current market conditions. Instead of running one fixed strategy at all times, it checks the market on every tick and switches between four methods: Breakout-Retest, Supply & Demand, Momentum Scalping, and Post-News Trading.
Tested and recommended on XAUUSD (Gold vs US Dollar), M15 chart. Other symbols have not been validated by the developer.
How It Works
The EA analyzes the market using the following data:
- H1 trend: EMA 20 vs EMA 50, and price position relative to the fast EMA
- RSI on M15
- ATR on H1 for volatility, stop loss, and take profit sizing
- Bollinger Bands on H1
- Swing highs and lows (breakout levels) on H1
- Supply and demand zones on H4
- Sudden volatility spikes on M5 (used as a news proxy)
Based on these, one method is active at any time:
- News Filter: Trading pauses when the market shows a sudden volatility spike, which often happens during news releases.
- Post-News Trading: After a large spike, the EA follows the direction of the move once volatility starts to cool. It uses half the normal lot size and a wider stop loss.
- Momentum Scalping: Active for a short window (default 45 minutes) at the opening of the London and New York sessions.
- Breakout-Retest: Triggers when price breaks a recent swing high or low and pulls back to retest that level.
- Supply & Demand: Trades reactions from H4 supply and demand zones during active trading sessions.
Risk Management
- Position size is calculated from your account balance and a fixed risk percentage per trade (default 1.0%).
- A maximum daily loss limit (default 5.0% of balance) stops trading for the rest of the day when reached.
- A maximum number of open positions per EA (default 2).
- Stop loss is based on ATR multiplied by a set value (default 1.5 × ATR).
- Take profit is set by a risk-to-reward ratio (default 1:2).
- Minimum time between trades: 1 hour for most methods, 15 minutes for post-news trades.
Backtest Results (XAUUSD, M15)
Settings used: Risk per trade 1.0%, Max daily loss 5.0%, Max open trades 2, R:R 1:2.0.
- Initial deposit: 500.00
- Total net profit: 652.00
- Gross profit: 9,565.27
- Gross loss: -8,913.27
- Profit factor: 1.07
- Expected payoff: 1.44 per trade
- Recovery factor: 0.76
- Sharpe ratio: 1.05
- Total trades: 454 (230 short, 224 long)
- Win rate: 32.82% of trades were profitable
- Average profit trade: 64.20, average loss trade: -29.22
- Largest profit trade: 355.86, largest loss trade: -130.99
- Maximum consecutive losses: 16 trades (-610.83)
- Maximum balance drawdown: 750.34 (60.42%)
- Maximum equity drawdown: 856.29 (62.23%)
- History quality: 100%, based on 79,901,054 ticks
These results are from historical testing only. They do not guarantee future performance. The drawdown figures are high, and a trader must be prepared for long losing streaks.
Recommended Setup
- Symbol: XAUUSD (tested)
- Timeframe: M15 for display (the EA reads its own timeframes internally)
- Minimum account balance: 500 USD, which is the tested starting capital. Because the backtest drawdown exceeded 60%, a larger balance is strongly recommended. Consider starting with at least 1,000 USD and/or reducing risk per trade to 0.5%.
- Broker: a broker with low spreads and fast execution, especially for the scalping method.
- Account type: a standard or micro account is suitable for testing small lot sizes.
Important Notes
- The news filter is volatility-based, not calendar-based. It reacts after spikes occur and does not know scheduled release times in advance.
- Test on a demo account for several weeks before trading a live account.
- Verify that your broker’s symbol name, contract size, and lot step match the settings used in testing.
- Default settings are a starting point. Results will vary with broker, spread, execution speed, and market conditions.
- Trading gold (XAUUSD) and other leveraged instruments carries a high risk of loss. Only trade with money you can afford to lose.
Support
Questions, bug reports, and feature requests are welcome through the Market comments section.
