Macro News XAUUSD
- Experts
-
Arno Olivier
I specialize in developing high-performance trading solutions tailored for Forex and high-volatility Synthetic Indices. My expertise includes creating custom MetaTrader 5 Expert Advisors (EAs), tailored indicators, and seamless VPS deployments to ensure low-latency execution. As an active MQL5 AI - Versione: 2.81
- Aggiornato: 13 settembre 2026
- Attivazioni: 5
Macro News XAU/USD is an Expert Advisor for MetaTrader 5 that trades Gold (XAU/USD) on Economic Calendar surprises. You pick the macro events you care about directly on the chart, and the EA opens a position in the direction of the surprise when the actual release differs from the forecast.
HOW IT WORKS - The EA reads the built-in MT5 Economic Calendar and lists upcoming events on the chart, filterable by currency and impact level (High / Medium / Low). - Click ADD on the events you want to trade; each is monitored until its scheduled release time. - When data is released, actual is compared with the forecast. A positive surprise produces a BUY, a negative surprise produces a SELL. Inverted metrics (unemployment, claims, inventories) are handled automatically. - Every trade opens with a stop loss in USD per position and a profit target that activates a trailing stop. Risk distances stay in USD, which keeps them consistent across lot sizes and symbols. - If the release never arrives, the event times out and is cancelled automatically (configurable in minutes).
RISK MANAGEMENT - Stop loss placed at order open, expressed in USD per position. - Profit-target trailing stop: once a position reaches the target profit, a trailing stop locks in gains (trailing distance also in USD). - Pre-trade margin check: orders are refused when free margin is insufficient, instead of repeated failed attempts. - Trades are tagged with a magic number; the EA only manages its own positions. - Input validation on start: lot size range/step, refresh timer and trading permissions are checked before anything runs.
BACKTEST MODE (STRATEGY TESTER) The EA includes a simulation mode that is active only inside the Strategy Tester: synthetic news releases (across impact levels, currencies and directions) exercise exactly the same event logic as live trading, so you can backtest the concept before going live. Simulation is automatically disabled on a live chart - no synthetic data can ever reach a real account. Note: inside the tester, positions are closed at the profit target with a market order (tester stop handling differs from live brokers); on a live chart the trailing-stop logic is used instead.
KEY INPUTS - Lot size (default 0.01) - Initial stop loss in USD (default 20.00) - Profit target in USD (default 10.00) - Trailing distance in USD (default 3.00) - Currency filter: ALL / USD / EUR / GBP (default ALL) - Event timeout in minutes (default 15) - Days ahead to display (default 7), refresh interval (default 30 sec)
REQUIREMENTS - MetaTrader 5, an account with XAU/USD (GOLD) available, and the MT5 Economic Calendar enabled. - Attach to the XAU/USD chart; the direction logic is developed for Gold. Using other symbols is at your own risk. - Brokers without XAU/USD or with netting accounts: the EA has been tested on EURUSD H1 with netting during validation.
DISCLAIMER This EA automates a specific trading idea and is provided as-is. No strategy can guarantee profits. Backtests and past validation results do not guarantee future performance. Test on a demo account first and never risk money you cannot afford to lose.
