Symbol mapping
Map TradingView symbols to broker symbols
A reliable webhook can still fail if the TradingView symbol does not match the broker instrument name. This page covers the checks needed before production.
Covered points
Broker suffixes and prefixes
Mapping for MT4, MT5 and cTrader
Support page for platform landing pages
Symbol mapping
Problem handled
Brokers often expose different names for the same instrument.
- XAUUSD can become XAUUSDm, GOLD or XAUUSD.pro
- Indices and CFDs vary by broker
- Explicit mapping avoids rejected orders
Symbol mapping
When mapping helps
Use symbol mapping when the name used in TradingView is not exactly the broker symbol.
- Broker symbol mapping
- MT4 symbol suffix
- TradingView XAUUSD to broker symbol
Symbol mapping
Linked pages
Symbol mapping should reinforce each platform page.
- TradingView to MT4
- TradingView to MT5
- TradingView to cTrader
Practical examples
Webhook payload example
Keep payloads explicit: the account connector can route the alert only when the action, symbol and target platform are clear.
{
"action": "buy",
"symbol": "XAUUSD",
"risk": 0.5,
"sl": 15,
"tp": 30,
"source": "TradingView",
"id": "tv-symbol-mapping-test-001",
"account": "DEMO-MT5-001",
"platform": "mt5"
}
Pine Script
Alert pattern to adapt
Use this as a reading pattern, then adjust order size, symbols and account routing before any real use.
//@version=5
indicator("The Connector webhook", overlay=true)
fast = ta.sma(close, 9)
slow = ta.sma(close, 21)
longSignal = ta.crossover(fast, slow)
if longSignal
alert("{\"action\":\"buy\",\"symbol\":\"" + syminfo.ticker + "\",\"risk\":0.5,\"sl\":15,\"tp\":30,\"source\":\"TradingView\",\"id\":\"" + syminfo.ticker + "-" + str.tostring(time) + "\",\"account\":\"DEMO-MT5-001\",\"platform\":\"mt5\"}", alert.freq_once_per_bar_close)
MT5
Limits to keep in mind
- Test each alert on a demo account before production.
- Broker, platform and network conditions still matter: validate the route before increasing volume.
- Use symbol mapping to adapt broker-specific names before sending live signals.
- A signal that arrives too late must be treated as expired rather than replayed.