How to Connect TradingView to MT5 — Complete 2026 Guide
TradingView lets you build powerful strategies in Pine Script, but it can't place trades in MetaTrader 5 on its own. This guide shows exactly how to bridge that gap using Trading Router — no coding required, setup in under 10 minutes.
What You Need Before You Start
- A TradingView account — any paid plan (alerts with webhooks require at least the Essential plan)
- A MetaTrader 5 terminal connected to your broker
- A Trading Router account — start with the free 7-day trial, no credit card required
How the Connection Works
TradingView supports "webhook alerts" — when your indicator or strategy triggers, TradingView sends a message to a URL you specify. Trading Router provides that URL. Our server receives the message and forwards the trade instruction to your MT5 terminal within 1 second via the Trading Router Expert Advisor (EA) running on your chart.
The flow is: TradingView alert → Trading Router server → MT5 EA → trade executed.
Step-by-Step Setup
Go to tradingrouter.com/register and sign up. After logging in, go to your Dashboard and copy your Master Token and Client Token — you'll need them for the TradingView alert message and the EA
Go to Downloads and download the Trading Router MT5 EA (.ex5 file). This is the piece of software that lives inside MT5 and listens for instructions from Trading Router's server.
In MT5, open the data folder: File → Open Data Folder. Navigate to MQL5/Experts/ and copy the .ex5 file there. Restart MT5, then go to Tools → Options → Expert Advisors and enable Allow algorithmic trading and Allow DLL imports.
In the MT5 Navigator panel, find TradingRouterEA under Expert Advisors. Drag it onto any chart (the symbol doesn't matter). In the Inputs tab, paste your Client Token. Click OK. You should see a green "EA running" icon in the top-right of the chart.
In TradingView, right-click on your chart or strategy and choose Add Alert. Set the condition to your indicator/strategy. In the Notifications tab, check Webhook URL and paste your Trading Router webhook URL (https://webhook.tradingrouter.com). In the Message field, paste the signal body.
The Alert Message
A simple buy order looks like this:
token=YOUR_CLIENT_TOKEN, signal=buy, symbol=EURUSD, risk_lots=0.1
To close all open positions on that symbol:
token=YOUR_CLIENT_TOKEN, signal=closeall, symbol=EURUSD
The full list of signals and parameters is in the Alert Syntax docs.
Test Your Setup
Before going live, use the Test Alert tool in your Trading Router dashboard. It sends a simulated signal to your EA so you can confirm the connection is working without placing a real trade.
Common Issues
EA shows "no connection" icon
Check that Allow DLL imports is enabled in MT5 Options. If you use VPS, also make sure your VPS's firewall isn't blocking outbound connections from MT5.
TradingView alert fires but no trade appears
Check the MT5 Journal tab — Trading Router EA logs every received signal there. Confirm the token in the alert message matches your dashboard token exactly (case-sensitive).
Wrong symbol name
Some brokers add suffixes to symbol names (e.g., EURUSDm instead of EURUSD). Use the Symbol Map feature in the EA settings to translate between TradingView and broker symbols automatically.
Next Steps
- Alert message syntax reference — all supported signals and parameters
- EA settings explained — trailing stop, daily P&L limits, symbol map, and more
- 5 TradingView strategies you can automate today