Send TradingView webhooks to MT5
Use TradingView for the signal and MetaTrader 5 for execution. TheConnector connects webhook alerts to MT5 accounts with clear routing control.
When this workflow fits
Use this workflow when TradingView creates the signal and MetaTrader 5 executes the order.
- TradingView to MT5 webhook
- MT5 webhook automation
- MetaTrader 5 alert execution
Routing and control
The signal should identify the account, symbol and expected action before it reaches the terminal.
- A stable alert message format
- An allowed MT5 account
- Daily plan limits enforced in the app
Next setup steps
After this overview, compare pricing, read the documentation or check the MT4 and cTrader workflows.
- View pricing
- Compare the MT4 workflow
- Discover the cTrader workflow
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": "EURUSD",
"risk": 0.5,
"sl": 15,
"tp": 30,
"source": "TradingView",
"id": "tv-tradingview-to-mt5-test-001",
"account": "DEMO-MT5-001",
"platform": "mt5"
}
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)
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.
MT5 checks: account mode, volume and filling
MT5 adds account-mode details that matter: netting or hedging, broker filling modes, minimum volume, volume step and precision can change how an instruction is accepted.
- Confirm whether the MT5 account is netting or hedging before testing close or reverse actions.
- Validate filling mode, minimum volume and volume step on the broker's demo environment.
- Check symbols such as XAUUSD, indices and crypto because naming and precision vary by broker.
Demo-first payload for this platform
Use placeholders only. With a per-account webhook URL, account and platform are optional but useful when documenting a shared route.
{
"action": "buy",
"symbol": "XAUUSD",
"volume": 0.20,
"sl": 15,
"tp": 30,
"source": "TradingView",
"id": "tv-tradingview-to-mt5-demo-001",
"account": "DEMO-MT5-001",
"platform": "mt5"
}