MQL5 Symbol Mapping
Definition
Symbol mapping in MQL5 handles the variation in how brokers name the same instrument — EUR/USD might be 'EURUSD', 'EURUSD.r', 'EURUSDpro', or 'EURUSD-Pro' depending on the broker. EAs must either be configured for the specific broker's naming or include symbol-mapping logic that detects the correct symbol name automatically.
In-depth: MQL5 Symbol Mapping
Symbol naming conventions vary substantially across forex brokers, creating one of the most common 'why doesn't my EA work?' issues when traders switch brokers or run EAs on multiple brokers.
Common naming variations for EUR/USD: - `EURUSD` (most common; many brokers) - `EURUSD.r` (raw spread account suffix at some ECN brokers) - `EURUSDpro` (premium account variant) - `EURUSD-T1`, `EURUSD-T2` (tiered liquidity at some ECN brokers) - `EUR/USD` (less common; some platforms display slash but storage is different) - `EURUSDm` (mini account variant at some brokers) - `EURUSDc` (cent account variant)
Gold (XAU/USD) naming variations: - `XAUUSD` (most common) - `GOLD` (some brokers) - `XAUUSD.r`, `XAUUSDpro`, etc. (suffix patterns same as forex)