Multi Symbol Tester Driver
The MT4 Strategy Tester advances exactly one symbol's clock. A rule that genuinely needs a second symbol's own trend or price ("buy EURUSD only when GBPUSD agrees") cannot read that second symbol's history reliably inside the tester - other symbols are not guaranteed to have their history loaded during a test run, and even when data happens to be present, it is not time-aligned to the driver symbol's own bar clock, so naive multi-symbol EAs frequently either fail outright in the tester or silently test against stale or misaligned data without any warning. This EA solves it by never asking the tester for a companion symbol's price at all. Instead, each companion's aligned close series is pre-exported to a plain two-column CSV (bar time, close) BEFORE the test run, using any script that walks the companion symbol/timeframe's own history outside the tester. This driver EA loads that file once in OnInit and, for each driver-symbol bar, looks up the companion's value by an EXACT time match via binary search - not by row position, which would silently drift out of alignment the moment a companion symbol has a session gap the driver symbol does not share. A bar with no exact companion row is treated as "no data this bar" and excluded from the vote, rather than guessed at with a nearest-neighbour value. The bundled trading rule is intentionally simple - buy when every loaded companion's own trend over InpTrendLookback bars agrees upward, sell when they all agree downward - since the point of this submission is the alignment mechanism itself, which is the genuinely hard and easy-to-get-wrong part of testing a multi-symbol idea in a single-symbol tester. Notes and limitations - This EA does trade the driver symbol - it is not report-only. The export step is the safety-relevant part: an outdated or misaligned companion file produces a wrong signal silently, so re-export whenever the test's date range changes. - Alignment requires an EXACT bar-time match between the driver's current bar and a row in the companion file. A companion file covering a different timeframe or a gapped session correctly contributes "no data" for the unmatched bars rather than a guess - by design, not a bug - but this means a badly-exported companion file can silently starve the vote rather than erroring loudly. - The bundled entry rule requires ALL loaded companions to agree; it does not implement partial-agreement weighting or any other voting scheme, since the alignment mechanism, not the rule sophistication, is this submission's point. - Only one position at a time on the driver symbol. - This works equally in a live/demo chart attach, not only the tester, since the underlying file lookup mechanism does not care which context it runs in - but its main design intent, and the reason for the pre-export step, is the tester's single-symbol limitation.
Expert advisor · MT5 · v1.0 · Free
About Multi Symbol Tester Driver
Multi Symbol Tester Driver is an expert advisor (trading robot) for MetaTrader 5. It has 10 settings, such as Companion symbol a, File name a and Companion symbol b. MQL source code included.
Files in the download: MultiSymbolTesterDriver.ex5, MultiSymbolTesterDriver.mq5, MultiSymbolTesterDriver.txt.
Trading robots can lose money. Check every setting and test on a demo account before using real funds.
Settings
| Setting | Default | What it does |
|---|---|---|
| Companion symbol a | GBPUSD | Companion symbol A - used only as a label and file-name key |
| File name a | MultiSymbolTesterDriver_GBPUSD.csv | Pre-exported aligned series for companion A, under MQL5\Files\ |
| Companion symbol b | USDJPY | Companion symbol B - set InpFileNameB blank to disable this leg |
| File name b | Pre-exported aligned series for companion B, blank = not used | |
| Trend lookback | 20 | Bars back used to judge each companion's own trend direction |
| Fixed lots | 0.10 | Lot size for the driver symbol's trades |
| Magic number | 40701 | Magic number for orders opened by this EA |
| Slippage pips | 3 | Slippage tolerance, in pips |
| Stop loss pips | 30 | Fixed stop loss on the driver symbol, in pips |
| Take profit pips | 60 | Fixed take profit on the driver symbol, in pips |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Experts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
- Test it first on a demo account or in the Strategy Tester.
Tags: Trend · EURUSD · GBPUSD · Multi-Currency · MT5 Expert Advisor · MQL5 Source Code