How to connect TradingView to MetaTrader 5 (MT5)
TradingView has no button that places orders on MetaTrader 5. What it does have is webhook alerts: when an alert fires, TradingView sends a short message to a web address. MT5 Bridge gives you that address, reads the message and places the order on your own MT5 account.
What you need
- A TradingView account on a paid plan. TradingView only sends webhook notifications on its paid plans.
- An MT5 account with your broker: its login number, password and server name. A demo account is the best place to start.
- An MT5 Bridge account. Your first MT5 account trades free for 7 days.
You do not need a VPS or a computer left on: your MT5 terminal runs on our servers.
Step by step
- Create your MT5 Bridge account. Go to Create account, enter your name, email, mobile number and a password, or use Continue with Google.
- Add your MT5 account. In the dashboard open MT5 Accounts and add your broker, server, login number and MT5 password. The bridge sets up your terminal on our servers and signs it in; this usually takes a few minutes. Your password is stored encrypted and only used to sign your own terminal in.
- Copy your webhook URL and API key. Both are on MT5 Accounts. The webhook URL is
https://mt5bridge.net/webhook; the API key tells the bridge which of your accounts the alert is for. - Create the alert in TradingView. On your chart click Alert (the clock icon), choose the condition (your indicator, strategy or a price level), then open Notifications, tick Webhook URL and paste the webhook URL.
- Write the message. In the alert's Message box put what the bridge should do, for example:
Every field is explained in the alert message guide. Using your own Pine Script? The Pine Script converter writes the message for you.{"apikey": "YOUR_API_KEY", "action": "buy", "symbol": "XAUUSD", "quantity": 0.10, "sl": 2310, "tp": 2345, "strategy_tag": "GOLD_SCALP"} - Create the alert and watch it arrive. Press Create. When it fires, the dashboard's Webhook Alerts page shows the alert and exactly what happened: the order placed, or the reason it was not.
What happens when an alert arrives
- The bridge checks the API key and finds your MT5 account.
- It checks the alert against your own rules: daily loss and profit limits, the spread guard, a pause around news, trade restrictions and your strategy tag settings.
- It places the order on your MT5 terminal. Stop loss and take profit are set on the order itself, so they sit on your broker's server and work even if TradingView or your internet goes down.
- The result is logged on Webhook Alerts, and, if you connect Telegram, sent to your phone.
The same alert arriving twice within seconds is ignored, so a double send never opens a double trade.
Common questions
Do I need to keep MetaTrader 5 open on my computer?
No. Your MT5 terminal runs on our servers around the clock. You can still open your account in your own MT5 app or on your phone at any time and see the same trades.
Which brokers work?
The bridge trades through an ordinary MT5 account with your broker. When you add your account you pick your broker and its server, the same as signing in to MT5 yourself.
Can I run several strategies or accounts?
Yes. Give each strategy its own strategy_tag so your history keeps them apart, and use copy trading to
send one alert to several MT5 accounts, each with its own lot multiplier.
My alert did not trade. Why?
Open Webhook Alerts: the message column says why. The usual reasons are one of your own limits, the broker refusing the order (for example a lot size below the symbol's minimum, or stops too close), or a wrong API key.
Create your account