Loading…

Broker Fill Quality Comparator

Claims about which broker "fills better" are almost always anecdotal. This EA replaces the anecdote with a log: on a timer, it sends a market order at the smallest practical size, records the price it asked for against the price it actually got, notes the spread at the moment of the request, times the whole round trip in milliseconds, and immediately closes the probe again. Run an identical copy of this EA on each broker or account you want to compare, on the same symbol, and put the resulting CSV files side by side - that is a genuine comparison, because both sides were measured the same way. Every probe costs real spread and, on a commission account, real commission, since a live round trip is the only honest way to measure a live fill - a demo account or a simulated fill proves nothing about a live broker's execution. InpArmLiveTrading defaults to false for exactly this reason: the EA runs as a harmless dry-run reporting what it would do until that input is explicitly switched on. Direction alternates between probes by default so a session that happens to fall in a trending market does not bias the readings toward one side. Notes and limitations - Every probe spends real spread and commission. Left running for a long period at a short interval this adds up - size the interval to what you are actually willing to spend on the comparison. - Slippage is measured against the price quoted immediately before the order was sent, which is the fairest reference available on either platform, but it is still one quote, not a full order-book snapshot. - If a probe's closing leg fails after every retry, it is logged loudly and left open for you to close by hand - the EA does not keep retrying silently forever in the background. - Comparisons are only meaningful between runs on the same symbol, at similar times, since spread and fill quality both vary by session. - On MQL5, run probes on a symbol with no other open exposure for the cleanest reading - see MQL4 VERSUS MQL5 DIFFERENCES above.

Expert advisor · MT5 · v1.0 · Free

About Broker Fill Quality Comparator

Broker Fill Quality Comparator is an expert advisor (trading robot) for MetaTrader 5. It has 10 settings, such as Arm live trading, Probe interval minutes and Use minimum lot. MQL source code included.

Files in the download: BrokerFillQualityComparator.ex5, BrokerFillQualityComparator.mq5, BrokerFillQualityComparator.txt.

Trading robots can lose money. Check every setting and test on a demo account before using real funds.

Settings

SettingDefaultWhat it does
Arm live tradingfalseMust be true to actually send probe trades - each one costs real spread
Probe interval minutes15Minutes between probe round trips
Use minimum lottrueProbe with the broker's minimum lot (recommended - smallest possible cost)
Fixed probe lots0.01Probe lot size when InpUseMinimumLot is false
Alternate directiontrueAlternate buy/sell each probe to cancel out directional drift
Csv file nameBrokerFillQualityComparator.csvLog file, in MQL5\Files
Magic number20261204Magic number identifying probe trades
Slippage pips3Slippage tolerance, in pips
Max retries5Attempts per order before giving up
Retry wait ms500Pause between attempts, milliseconds

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Experts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
  6. Test it first on a demo account or in the Strategy Tester.

Download the PDF guide

Tags: MT5 Expert Advisor · MQL5 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria