GoldScalp EA
- Experts
- Versione: 1.0
- Attivazioni: 10
Live Signal: https://www.mql5.com/zh/signals/2388348?source=Site
A fully automated trading EA built exclusively for XAUUSD (Gold) on the MetaTrader 5 platform. It adopts a two-way pending order entry system with a maximum of 1 open position per direction, paired with a per-order structured dynamic closing engine that completely replaces the rigid fixed take-profit/stop-loss logic of traditional EAs. Each order calculates profit independently and triggers its own closing monitor, determining exit timing based on market momentum and transaction costs to maximize trend gains while strictly controlling position risk.
Core Mechanism Highlights
1. Entry Logic: Two-Way Pending Orders, One Order at a Time
The EA supports both long and short pending order entries. Only one pending order is active at any given time, with no stacking of unexecuted orders. A maximum of 1 open position is allowed per trading direction. A new pending order is only generated after the existing one is filled, strictly controlling entry frequency and preventing overexposure from the entry stage.
2. Structured Dynamic Closing Engine (Per-Order Independent Trigger)
- Per-Order Profit Threshold Trigger, Independent Exit Management It does not exit prematurely at minor floating profit, nor does it rely on combined net profit across long and short positions. Each position calculates its net profit independently (automatically deducting commissions, swap fees, and estimated closing slippage). When the order’s own profit reaches the preset threshold, it activates its dedicated closing monitor cycle. Once triggered, the system continues tracking exit conditions even through short-term price fluctuations, and will not abort the exit logic easily. Closing is executed only for the profitable direction.
- Momentum Tracking, Dynamic Profit Target Escalation Once the profit threshold is met, the EA locks in the current market momentum baseline and raises the order’s profit target step by step. When momentum continues and price advances, profits are allowed to run fully. If momentum fades and the next target cannot be reached within the defined period, the system automatically enters pre-closing status — capturing full trend gains while avoiding deep pullbacks.
- Full-Cost Net Profit Calculation, No Paper Profit Illusion All profit/loss calculations incorporate bid-ask spread, trading commissions, overnight swap fees, and estimated slippage. Decisions are based on actual realized net profit rather than superficial floating P&L on the chart, effectively narrowing the performance gap between backtest and live trading.
- Closing Execution Guarantee Mechanism Closing instructions are issued independently for each order. The system tracks execution status in real time, and automatically retries in case of network delays or execution rejection, ensuring reliable order closure and eliminating stuck positions.
- Trading Session & Spread Protection Built-in market session recognition automatically suspends pending orders and closing requests during market closures, and resumes operation automatically on market open, avoiding Market closed errors. It also features spread filtering to skip periods of low liquidity and abnormally wide spreads, keeping transaction costs stable.
3. Exclusive Risk Rule: No New Orders on Fridays
Built-in weekly time-based risk control: No new pending orders or new positions are opened on Fridays at any time, proactively avoiding gap risk from weekend news events. Existing positions opened before Friday remain unaffected and continue to be managed by the dynamic closing logic for orderly exit, isolating weekend black swan risks.
Backtest Performance Highlights (99% High-Quality Tick Data)
Recommended Environment
- Platform: MetaTrader 5
- Instrument: XAUUSD (Gold)
- Recommended timeframe: H1 (1-hour chart)
- Account type: Hedging Account
- Broker requirement: Brokers with stable gold quotes, tight spreads and reliable execution.
Risk Disclaimer
Historical backtest results are for strategy performance reference only and do not guarantee future live performance. Gold is a highly volatile instrument. Live results may be affected by broker spreads, slippage, execution latency, market liquidity, weekend news events and other factors. Before deploying real capital, we strongly recommend extensive testing on a demo account to fully verify the strategy under live market conditions.
