Skip to content
All library documents

Connecting a News API to a MetaTrader 5 News Feed

Article MQL5 articles

Summary

This article shows how to build a custom news feed for MetaTrader 5 by retrieving headlines and source metadata from a web news API. It explains how source requests can be filtered by category, language, or country, and how article requests select a source and sorting order. An MQL5 script constructs requests, sends HTTP GET calls, and saves the returned JSON text so users can inspect the response structure before parsing it. The article then describes using JSON libraries and a chart text box in an Expert Advisor to display the feed.

The example provides a way to choose among supported outlets from one API and avoid manually configuring separate RSS URLs. Its stated limitation is that source coverage is concentrated in the United States and Europe and offers limited language variety. The demonstrated EA is described as basic, with automatic updates identified as a possible extension. This is a software integration guide; it does not analyze whether news headlines predict market moves or improve trading outcomes.

Key ideas

  • A web API can provide source lists and headlines for display inside MetaTrader 5.
  • Source queries can be filtered by category, language, and country, while article queries select an outlet and sort order.
  • An MQL5 script can save JSON responses for inspection before an Expert Advisor parses and displays them.
  • The described service has limited language variety and is weighted toward United States and European outlets.
  • The article demonstrates feed integration, not a tested news-based trading strategy.

Tags

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