Gold Adaptive Scalper
- Experts
- Versione: 1.42
- Attivazioni: 5
Gold Adaptive Scalper is an automated MetaTrader 5 Expert Advisor built for XAUUSD (Gold) on the M5 timeframe. It pairs an H1 Exponential Moving Average trend filter with M5 engulfing bar triggers, ATR-based initial stops and targets, a step-throttled trailing stop, and a daily consecutive-loss circuit breaker.
Key Features
- Higher-Timeframe Trend Alignment: Uses an H1 close-price EMA (InpH1Ema) so entries align with the broader intraday direction rather than trading blindly against momentum.
- M5 Engulfing Entries: Evaluates completed M5 bar engulfing patterns only when trend alignment, broker session hours (InpStartHour to InpEndHour), and spread limits (InpMaxSpread) are satisfied.
- Dynamic ATR Risk & Trailing Stop: Sets initial Stop Loss and Take Profit from M5 Average True Range multiples (InpAtrSlMult and InpAtrTpMult), then trails profit once price reaches InpTrailActivation using InpTrailStep and broker stop/freeze-level checks.
- Daily Loss Protection: Tracks closed deals for the current day, symbol, and magic number, pausing new trades if consecutive losses hit InpMaxDailyLosses.
- Built-In Execution Safeguards: Validates trading permissions, lot step/min/max constraints, stop distances, and margin before placing or modifying orders.
Input Parameters
- InpLotSize (0.01): Base trade volume in lots, normalized to broker limits.
- InpH1Ema (50): Period of the H1 close-price Exponential Moving Average filter.
- InpAtrPeriod (14): Period of the M5 Average True Range indicator.
- InpAtrSlMult (1.5): M5 ATR multiplier for initial Stop Loss distance.
- InpAtrTpMult (2.0): M5 ATR multiplier for initial Take Profit distance.
- InpTrailActivation (1.0): Profit threshold in ATR multiples before trailing activates.
- InpTrailStep (0.5): Trailing step distance in ATR multiples behind price.
- InpMaxSpread (30): Maximum allowed spread in points for entries (0 disables the filter).
- InpStartHour (9): Start hour (0-23, broker server time) for new entries.
- InpEndHour (18): End hour (1-24, broker server time; entries stop at InpEndHour).
- InpMaxDailyLosses (3): Max consecutive daily losses before pausing new trades (0 disables).
- InpMagicNum (77777): Unique magic number identifying trades managed by this EA.
How to Test the Demo Before Buying
- Run the Strategy Tester on XAUUSD, M5 using real or every-tick modeling and make sure H1 history data is downloaded.
- Match InpStartHour and InpEndHour to your broker's server time and test with realistic gold spreads.
Risk Warning
Trading CFDs and leveraged instruments carries a high risk of loss. Test thoroughly in the Strategy Tester and on a demo account first; past performance does not guarantee future results.
