Multi-Timeframe (H1/H4) Closed-Bar Parity & Broker-Agnostic DXY Symbol Discovery in Multi-Pair MQL5 EAs

Ran into two small parity traps recently while comparing external tick backtests against Strategy Tester (Every tick based on real ticks) on multi-pair M15 Expert Advisors, sharing in case it saves someone else a headache.

The first one was higher-timeframe bar alignment. Reading CopyBuffer(..., 0, 1, ...) on PERIOD_H1 or PERIOD_H4 in MQL5 guarantees that a 10:15 M15 signal only sees the closed 09:00-09:59 H1 bar. In our external research scripts, joining H1 bars by open timestamp instead of bar close timestamp (t_open + PeriodSeconds(tf)) was silently leaking up to 45 minutes on H1 and 225 minutes on H4, which explained why certain high-Sharpe parameter sets decayed as soon as they went on a live demo server.

The second issue was broker naming for live USD correlation filters across EURUSD, GBPUSD, and XAUUSD. Depending on the server, the dollar index shows up as DXY, USDX, USDX.r, _DXY, or USDIndex (and is often hidden until SymbolSelect is called). Scanning SymbolsTotal(false) once in OnInit() against a short alias list and computing Pearson correlation on closed log-returns turned out much cleaner than hardcoding symbol strings per broker.

Curious how others here handle missing cross-asset reference symbols or suffix mapping when deploying the same EA across multiple MT5 brokers?