How to Connect TradingView to MT4 and MT5 (Step-by-Step)

Published July 19, 2026 · Updated November 19, 2026 · In Signal Copiers

There is no button inside TradingView that sends an order to MetaTrader. To connect TradingView to MT4 and MT5, you chain four pieces together: an alert, a webhook, a bridge that catches it, and an Expert Advisor (EA) that places the trade in your terminal. Once that chain works, an alert on your chart turns into a live order in MetaTrader, and nobody has to type it.

TradingView’s webhook rules and MetaQuotes’ WebRequest rules decide how you connect TradingView to MT4 and MT5, and they also explain why a home PC can’t receive alerts directly. This page is general education about software, not financial or investment advice.

Want copy-paste JSON alerts? Our TradingView webhook example post shows five of them, field by field.

Why TradingView can’t place MetaTrader trades by itself

A TradingView alert is a notification. It can pop up on screen, send an email, or post a message to a web address. That last option, the webhook, is the only way out to other software. According to TradingView’s help center, a webhook is a plain HTTP POST request with your alert message as the body.

MetaTrader doesn’t listen for incoming web requests, though. An EA can call out to a server, but nothing in the terminal sits waiting for TradingView to knock. Something in the middle has to carry TradingView alerts to MetaTrader, and that middle piece is the bridge.

Splitting the job keeps each platform on what it does well: charts, Pine Script and alerts in TradingView, execution at your MetaTrader broker.

An alert that fires at 3 a.m. still gets traded, and the same rules run the same way every time. On a VPS, the whole chain keeps working 24/5 while your own computer is off.

What you need first: a paid plan, 2FA, a terminal and a bridge

You don’t need to write code to connect TradingView to MT4 and MT5: the bridge does the plumbing, and you set the rules. MetaTrader comes free with your broker account, so the TradingView plan is the only subscription the webhook itself requires. Plans change, so check that pricing table before you subscribe.

How one alert reaches MetaTrader

  1. Your TradingView alert fires and posts its message to the bridge’s web address.
  2. The bridge reads the trade details in that message.
  3. It maps the symbol to your broker’s exact name and applies your risk rules.
  4. Finally, an EA in MT4 or MT5 places the order.
Connect TradingView to MT4 and MT5: the alert fires, the webhook reaches the bridge, the bridge maps the symbol and applies risk, and an EA places the order
Four hops connect TradingView to MT4 and MT5 for every alert. If a trade does not appear, check each hop in this order.

TradingView’s webhook rules shape the bridge

Anyone who tries to connect TradingView to MT4 and MT5 runs into the same few limits, all set in TradingView’s webhook guide. It sends only to ports 80 and 443, the normal web ports. It doesn’t support IPv6 addresses yet. And if the receiving server takes longer than three seconds to process a request, TradingView cancels it.

TradingView’s webhook rules stop you pointing alerts straight at your trading PC. A home computer usually sits behind a router with no public address, and opening port 80 on it is asking for trouble.

Most bridges take the webhook on a server first and pass the order on from there. The server also has to answer quickly. A bridge that waits for the broker’s fill before replying can run past the three-second limit.

If your alert message is valid JSON, TradingView sends it as application/json; otherwise it goes as plain text. A bridge that expects JSON will therefore reject a message with one stray quote mark.

TradingView also warns against putting passwords or other credentials in the message. Your alert should carry a bridge key, never your broker login.

The MetaTrader end needs an EA

On the MetaTrader side, the program that pulls orders in is almost always an EA. MetaQuotes’ WebRequest documentation says the function works only in Expert Advisors and scripts, never in indicators. The MT4 version has the same limit. On top of that, the terminal blocks the call unless the server’s address is on its allowed list. That list sits in the same Expert Advisors tab whether you’re wiring TradingView to MT4 or TradingView to MT5, and MetaQuotes leaves it off by default for security.

How to connect TradingView to MT4 and MT5, step by step

Step 1: Write a precise alert message

Create the alert with the clock icon, then fill in the Message box with the action, symbol, stop loss, take profit and size. A plain line such as BUY EURUSD SL=1.0850 TP=1.0920 RISK=1% shows the idea, but every bridge reads its own format. Ours, for instance, takes one short line of JSON with a key, the symbol and the type. TradingView placeholders such as {{ticker}} and {{close}} fill in live values for you.

Step 2: Turn on the webhook

In the alert’s Notifications tab, tick Webhook URL and paste the bridge’s address. From then on, TradingView posts your message there each time the alert fires. TradingView’s own webhook guide shows the box, along with the port rules above.

Step 3: Connect the bridge to MT4 or MT5

Next, link the bridge to your terminal, usually with a small EA on a chart. Add the bridge’s address under Tools, Options, Expert Advisors, Allow WebRequest for listed URL. Then switch on algo trading, or nothing will trade.

Step 4: Map symbols and set your risk

TradingView’s XAUUSD may be GOLD or XAUUSD.m at your broker, so map each symbol once. After that, set a lot size or risk percent, a trade cap, a daily loss limit and a spread filter.

Step 5: Test on demo, then go live

Fire the alert by hand on a demo MT4 or MT5 account. Check that the trade opened with the right stop loss and take profit, then try a close alert too.

When it all behaves, move to live at a small size. Then watch the first few real alerts land in the terminal. A demo account and a live account at the same broker can still name symbols differently, and you only want to learn that on a tiny position.

Five steps to connect TradingView to MetaTrader: alert message, webhook, bridge, symbol mapping and risk, demo test
Do the five steps to connect TradingView to MT4 and MT5 in order, and finish with a test alert on a demo account.

Indicator alerts or Pine Script strategy alerts?

Indicator alerts fire on a condition, such as RSI crossing 30. They’re simple, and they work well for entries.

Strategy alerts fire on the orders a Pine Script strategy() makes, so they carry exits as well as entries. TradingView’s strategy alerts page lists the details. The placeholder {{strategy.order.action}} returns “buy” or “sell”, and the alerts trigger only for orders executed in real time.

A strategy alert runs on its own copy of the strategy on TradingView’s servers. If you change the inputs on your chart later, the alert keeps trading the old settings until you delete it and create a new one. TradingView also stops an alert that triggers more than 15 times in 3 minutes, which matters for fast scalping scripts.

A good bridge handles both alert types. Still need the strategy itself? Then see TradingView strategy automation or Pine Script development.

Risk controls to set before the first live alert

Risk controls for a TradingView to MetaTrader bridge: max risk per trade, daily loss limit, spread filter, max open trades, repeats and stale alerts ignored
Test each one on a demo account before you go live.

The bridge decides nothing: it applies your limits to each alert, and an alert that breaks one should be skipped and written to the log.

Alert fired, no trade? Check these in order

When a first attempt to connect TradingView to MT4 and MT5 fails, it almost always breaks at one of these points. Work down the list, since each check rules out one hop.

  1. Open the alert log in TradingView and look at the Webhook status column. TradingView admits that webhooks occasionally fail to arrive, and this column tells you whether yours did.
  2. Compare the message with the format your bridge expects. A typo here is the usual culprit.
  3. Check that algo trading is on in MetaTrader and that the EA itself may trade.
  4. If the EA logs a WebRequest error, add the bridge’s address to the allowed URL list.
  5. Wrong symbol filled? Then fix the symbol mapping to your broker’s names.
  6. Trades doubling up? Turn on the bridge’s filter for repeated alerts.
  7. Bridge offline? Run it on a VPS and pick one that reconnects by itself.

Build your own bridge, or have one built?

DIY / generic toolCustom-built bridge (done-for-you)
SetupYou wire up webhooks yourselfBuilt for your alerts, broker and platform
Alert formatOnly if yours matches its formatTailored to your exact Pine or alert messages
MT4 + MT5Sometimes one onlyWorks with both, and with several accounts
Pine strategyOften entries onlyEntries and exits from your strategy
SupportLimitedSetup help over WhatsApp or Telegram, plus updates

Plenty of traders connect TradingView to MT4 and MT5 with a generic tool, and for simple indicator alerts that can work fine. But a bridge built for you is the safer choice for a Pine strategy, or when you need MT4 and MT5 on several accounts. If you code, open source webhook listeners exist too; just remember you then own the three-second timeout, the uptime and the security yourself.

A relay copier, or a bridge built around your alerts

Our TradingView to MT4/MT5 copier is one ready-made way to connect TradingView to MT4 and MT5. Because a home PC or VPS doesn’t normally have a public web address, your alert goes to a private relay address instead. Then an EA on your chart collects it, four times a second by default, and places the order.

Only the alert passes through that relay. Your broker login stays in your own terminal, and the orders leave from your own MT4 or MT5. The EA also ignores stale alerts, repeats and TradingView’s test fires. If you would rather not keep a terminal running at all, TPcopier offers a cloud version where the MetaTrader side is hosted for you.

One TradingView alert feeding several MetaTrader terminals: an MT4 account, an MT5 account and a second MT5 account
Every terminal on the same feed reads the same alert, each with its own lot rule.

Trading somewhere other than MetaTrader? The same idea works with the TradingView to Indian broker copier and the TradingView to Binance bot. There’s a Delta Exchange version too. If your signals come from a channel instead, read how to copy Telegram signals to MT4 and MT5.

We build software only, so we don’t sell signals, give investment advice or manage funds. Custom work gets a fixed quote (see pricing), it’s tested on a demo account first, and you receive the source code. To have a bridge built around your own alerts, ask for a quote.

Connect TradingView to MT4 and MT5: frequently asked questions

Do I need a paid TradingView plan?

Yes. Sending alerts to a webhook needs a paid TradingView plan, so a free account cannot do it. TradingView also asks for two-factor authentication before it sends webhooks.

Can I connect TradingView to MT4 and MT5 without a VPS?

Yes, if your own PC stays on with the terminal open. With a relay bridge like ours, the EA pulls alerts from the relay, so your PC needs no public address or open port. A VPS only matters because alerts can fire while you sleep.

Can I automate a Pine Script strategy, not just indicator alerts?

Yes. A bridge can run both the entries and the exits from the alerts of a Pine strategy() script.

Does it work with both MT4 and MT5?

Yes. The same TradingView alerts can go to MT4, to MT5 or to several accounts at once. Not sure which platform suits you? Then read MT4 vs MT5.

How fast is execution?

Execution speed depends on TradingView’s delivery, your connection and your broker. With our copier, the EA checks the relay four times a second by default. It also ignores any alert older than the age you set, so a late alert never fills at a stale price.

Can I connect TradingView to MT4 and MT5 for free?

Not fully, because the webhook itself needs a paid TradingView plan. MetaTrader, on the other hand, comes free with your broker account.

Can an alert close a trade, not just open one?

Yes. With our copier, a buyclose alert closes that strategy’s buys and a sellclose closes its sells. It also deletes any pending order left on that side.

Why does my alert fire but no trade opens?

Most often the message format does not match what the bridge reads. Otherwise, check that algo trading is on in MetaTrader and that the symbol maps to your broker’s name.

Is this legal and safe?

It is trade-execution software that runs on your own account with your own settings. It is not a managed account, a tips service or advice. So you make your own trading decisions and stay responsible for them.

Want this built for you?

We develop it as a service — reliable, tested, and yours to own.

Message Us on WhatsApp
WhatsApp