This article shows how to aggregate quotes from multiple brokers in MQL5 via a simple file‑based bridge. Publisher EAs write bid, ask, and volume per tick; a timer-driven master EA validates inputs, excludes stale feeds, and produces a volume-weighted synthetic mid-price. The EA publishes the series to a custom symbol you can chart and test; the design was exercised on three broker demo accounts.
Every broker quotes its own bid and ask, and those prices rarely match another broker's exactly because of differences in liquidity sourcing, markup, and latency. The gap matters when comparing execution quality, auditing spread widening during news, or building a reference price that does not depend on one broker. MetaTrader 5 has no built-in way to do this, because each terminal is sandboxed and no API lets one terminal read another's live quotes.
The bridge is deliberately simple: shared files on disk. A small Expert Advisor in each broker terminal writes its quote to a broker-named file on every tick. A separate aggregator Expert Advisor reads those files on a timer, computes a volume-weighted mid-price, and writes it to a custom symbol that can be charted. This symbol is not an ordinary market symbol: each bar is flat, the spread is zero, and the volume fields carry diagnostics. Bar times follow the clock only with a 60-second timer, so at other intervals the series suits live monitoring rather than backtesting (see Limitations).
Two problems matter more than the file input and output: how much weight each feed should carry, and what to do when a file stops updating because a terminal disconnected or closed. A synthetic price that silently averages in a frozen quote is worse than none, so the aggregator detects and excludes stale feeds explicitly. We tested the pipeline on three broker demo accounts, and the findings section lists the conditions so that the observations can be reproduced.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Check out the new article: Aggregating Multi-Broker Tick Feeds into a Synthetic Mid-Price in MQL5.
Every broker quotes its own bid and ask, and those prices rarely match another broker's exactly because of differences in liquidity sourcing, markup, and latency. The gap matters when comparing execution quality, auditing spread widening during news, or building a reference price that does not depend on one broker. MetaTrader 5 has no built-in way to do this, because each terminal is sandboxed and no API lets one terminal read another's live quotes.
The bridge is deliberately simple: shared files on disk. A small Expert Advisor in each broker terminal writes its quote to a broker-named file on every tick. A separate aggregator Expert Advisor reads those files on a timer, computes a volume-weighted mid-price, and writes it to a custom symbol that can be charted. This symbol is not an ordinary market symbol: each bar is flat, the spread is zero, and the volume fields carry diagnostics. Bar times follow the clock only with a 60-second timer, so at other intervals the series suits live monitoring rather than backtesting (see Limitations).
Two problems matter more than the file input and output: how much weight each feed should carry, and what to do when a file stops updating because a terminal disconnected or closed. A synthetic price that silently averages in a frozen quote is worse than none, so the aggregator detects and excludes stale feeds explicitly. We tested the pipeline on three broker demo accounts, and the findings section lists the conditions so that the observations can be reproduced.
Author: Ushana Kevin Iorkumbul