Skip to content
All library documents

Displaying ForexFactory High-Impact Events in a Trading Chart

Article MQL5 code base

Summary

This implementation guide shows how a MetaTrader indicator or Expert Advisor can retrieve a day’s economic calendar from Forex Factory, parse event time, title, currency, and impact from the returned HTML, and store matching high-impact events. It filters events by whether their currency appears in the traded symbol, places chart markers and future vertical lines, and triggers an alert when an event is within five minutes. The author’s motivating example is checking the release date of crude oil inventory data, whose schedule can shift around holidays.

The article provides code fragments and describes configuration steps, but no tests or evidence that the approach remains reliable. It depends on an external website’s HTML structure and an allowed web request setting, so changes to the page or access rules could break parsing. The shown method fetches a daily calendar during initialization; the author notes that a midnight refresh would need to be added. It is an event-display and alerting utility, not a strategy with demonstrated trading returns.

Key ideas

  • The example retrieves a daily economic calendar and extracts event time, title, currency, and impact from its HTML.
  • It filters high-impact events by matching their currency to the traded symbol.
  • Future events are marked on the chart, with an alert issued during the five minutes before release.
  • The parser depends on the external page structure, and the example does not refresh the event list at midnight.
  • The article presents an implementation technique rather than evidence of trading performance.

Tags

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