Skip to content
All library documents

Pausing XAUUSD Expert Advisors Around Scheduled News

Article MQL5 code base

Summary

The document explains a basic MT5 Expert Advisor news filter for XAUUSD. It defines a list of scheduled news timestamps and checks whether the current server time falls within a configurable interval before or after any listed event. While inside that interval, the EA skips its trading logic. The example uses a single simulated timestamp and a 15-minute buffer on each side, with major USD, GBP, and EUR releases cited as relevant to gold volatility.

This is a starting point rather than a complete news service: event times must be supplied manually or connected to a real data source, and the example does not establish that the filter improves trading results. It also does not explain how to handle time-zone differences, stale calendars, or open positions during the pause. The document briefly advertises a commercial EA with additional risk controls; those features are not evaluated.

Key ideas

  • A news filter can prevent an Expert Advisor from opening or managing trades through its normal logic during selected event windows.
  • The example defines pause windows by subtracting and adding configurable minutes around each scheduled timestamp.
  • The shown event list is simulated, so practical use requires a reliable source of current news times.
  • The filter does not itself control existing positions or demonstrate improved performance.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.