Symbol Robustness Harness
A signal that only makes sense on the one instrument it was tuned on is fitted to that instrument's quirks, not a genuinely robust read. The obvious way to check is to run the same logic on several symbol charts at once and compare, but that means attaching several EAs and manually cross-referencing their logs. This harness does the comparison itself: from one chart it calls iMA() directly against up to six configurable comparison symbols, because MQL4 can read any symbol's series without a separate chart for each one - no multi-chart setup is required. Every time the attached chart's own symbol forms a new closed bar, the harness takes a directional read (fast MA above or below slow MA) on the chart's symbol and on every configured comparison symbol, then tallies how often each comparison symbol agreed with the reference. It never sends an order. A CSV report with per-symbol agreement percentages is written periodically and again when the EA is removed, and a live summary is shown in the chart Comment. A comparison symbol not already visible in Market Watch has its price history requested via SymbolSelect() as early as possible in OnInit, but that history can still take a moment to arrive - early samples for a freshly-added symbol are simply excluded rather than guessed at. Notes and limitations - Report-only. This EA places no orders and manages no positions. - A comparison symbol with fewer bars of history than InpSlowMaPeriod needs, or whose history has not finished syncing yet, is excluded from that sample's denominator rather than counted as a disagreement. - High agreement across symbols says the RAW directional read is stable across instruments - it says nothing about whether the strategy built on top of that read would actually be profitable on any of them, and different instruments have very different spread and volatility characteristics that this harness does not measure. - The report file accumulates until InpReportEveryNSamples is next reached or the EA is removed from the chart; delete it manually between separate test runs if a clean file is wanted each time.
Expert advisor · MT4 · v1.0 · Free
About Symbol Robustness Harness
Symbol Robustness Harness is a script for MetaTrader 4 based on Moving Average. It can alert you with a pop-up, sound, email or push message and shows several symbols in one panel. It has 11 settings, such as Fast ma period, Slow ma period and Ma method. MQL source code included.
Files in the download: SymbolRobustnessHarness.ex4, SymbolRobustnessHarness.mq4, SymbolRobustnessHarness.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Fast ma period | 10 | Fast MA period (same value tested on every symbol) |
| Slow ma period | 30 | Slow MA period |
| Ma method | MODE_EMA | MA method (0 SMA,1 EMA,2 SMMA,3 LWMA) |
| Symbol1 | EURUSD | Comparison symbol 1 (blank to skip) |
| Symbol2 | GBPUSD | Comparison symbol 2 (blank to skip) |
| Symbol3 | USDJPY | Comparison symbol 3 (blank to skip) |
| Symbol4 | AUDUSD | Comparison symbol 4 (blank to skip) |
| Symbol5 | USDCHF | Comparison symbol 5 (blank to skip) |
| Symbol6 | Comparison symbol 6 (blank to skip) | |
| Report every n samples | 20 | Write the CSV report after this many new samples |
| Report file name | SymbolRobustnessHarness_report.csv | Report file, written under MQL4\Files\ |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Moving Average · Buy/Sell Arrows · Alerts · Dashboards & Scanners · MT4 Expert Advisor · MQL4 Source Code