Skip to content
All library documents

Routing Web Data to MetaTrader 5 Expert Advisors

Article MQL5 articles

Summary

This article describes ways to bring information from a website into a MetaTrader 5 Expert Advisor. The direct approach calls the platform’s web request function on a timer, checks for expected text at specified positions in the response, and extracts a value. The author warns that a slow remote server can block the EA while it waits, potentially interfering with the trading system.

As an alternative, the article proposes separating data collection from the EA. A script repeatedly fetches the web data and passes it through a shared chart object; a later example uses a terminal global variable as a channel for numeric values. The EA reads the locally available value rather than requesting the remote page itself. The examples use a market-data website and demonstrate platform plumbing, not a tested trading strategy. They offer limited handling of page changes or failed requests, and the described channels have constraints, so reliability depends on the data source and implementation.

Key ideas

  • A timer can make an EA request web data periodically, but waiting on a remote response can interrupt its work.
  • The example validates response text at fixed positions before extracting a value.
  • A separate script can collect data and pass it to an EA through a shared chart object.
  • Terminal global variables provide another channel when the collected data is numeric.
  • These examples demonstrate data transport and do not establish the reliability of the source or a trading edge.

Tags

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