Why MetaTrader has no inbound webhook (and how to automate TradingView alerts anyway)
MetaTrader 4 and MetaTrader 5 cannot receive webhooks: the terminal is a desktop application with no public HTTPS endpoint, so there is nothing for TradingView to send an alert to. To automate TradingView alerts on MT5 without a VPS, point the alert's webhook at a cloud service such as PipSync, which receives the request server-side and turns it into a signal you review on your Signals page before it goes to your account. Auto-trade is opt-in and off by default: on the Advanced plan, a JSON alert that TradingView itself sends and that passes every safety check is placed on your linked accounts without approval. A webhook from your own system is never traded automatically.
Billed at checkout · Cancel any time · Free plan available
Risk warning: Trading CFDs and other leveraged products is complex and carries a high risk of losing money rapidly because of leverage. Industry data indicates that 70–80% of retail trading accounts lose money on these products. Risk disclosure · Past performance.
This guide explains the technical reason MetaTrader has no inbound webhook, walks through the two classic workarounds — a listener EA on your own machine and a Windows VPS running a bridge EA — including where they fail, and then shows the cloud-routing setup that removes terminal-side infrastructure entirely, including the optional auto-trade switch.
MetaTrader webhooks at a glance
How do I set up TradingView → PipSync → MT5?
Two prerequisites: a PipSync plan that includes webhook integration (the Advanced plan) and a paid TradingView plan, because TradingView only delivers webhook alerts on paid plans.
Create your PipSync account and subscribe to a plan
Sign up at app.pipsync.io (the $0 Free plan needs no card but only parses signals), then subscribe to a plan that covers this route (payment method required). Everything this guide covers, from generating your webhook URL to firing test alerts at a demo account, is included in a plan with webhook integration.
Add a TradingView webhook source
In the dashboard, go to Settings → Advanced → TradingView Alerts and generate your webhook URL (pipsync.io/api/tradingview/webhook/<your-secret-token>). It is shown once, so copy it right away. Treat it like a password: anyone with the URL can send signals to your account and, once auto-trade is on, trigger trades. Regenerate it if you suspect a leak.
Connect your MT5 account
Add your MetaTrader 5 account as the destination and set your server-side risk rules — lot sizing, SL/TP mapping, max open trades. Starting on a demo account is recommended.
Create the TradingView alert
In TradingView, create an alert on your strategy or condition. In the Message field, paste the JSON payload PipSync expects — instrument, direction, entry, sl, tp1 — using placeholders such as {{strategy.order.action}}, {{ticker}} and {{close}} so TradingView fills the values when the alert fires. Add no size field such as lots: an alert that names its own size is never auto-traded. Then, under Notifications, enable Webhook URL and paste your PipSync URL.
Send a test signal and go live deliberately
Fire the alert once, then check Recent alerts under Settings → Advanced → TradingView Alerts. Each alert arrives as a signal on the Signals page: assign your MT5 account there and confirm it. Stay on demo until a few alerts have arrived exactly the way you expect.
Optional: switch on auto-trade
Once a few alerts have arrived as expected, tick the consent under Settings → Advanced → TradingView Alerts and click Set up auto-trading (Advanced plan). Then open Accounts & auto-trade, link your MT5 account and switch auto-trade on. Until you do, every alert stays a signal for your approval.
Typical setup time: about 12 minutes.
What is a webhook?
A webhook is an HTTP callback: when an event happens in one system, that system sends an HTTP POST request — usually with a JSON body — to a URL that another system has published in order to receive it. The defining property is direction: the receiver does not poll for updates; it exposes a public endpoint and waits to be called.
TradingView alerts work exactly this way. When an alert fires, TradingView POSTs the alert message once, immediately, to whatever webhook URL you entered in the alert's notification settings. So the whole question of "MetaTrader webhooks" reduces to one question: is there a URL on the internet that leads to your MT4/MT5 terminal? There is not — and the next section explains why that is structural, not a missing setting.
Why can't MetaTrader 4 or 5 receive webhooks?
Because the MetaTrader terminal is a desktop client, not a server. It runs on your PC behind your router's NAT and firewall, it has no public IP, no domain, no TLS certificate — and, most fundamentally, MetaQuotes ships no inbound HTTP listener in the terminal at all. There is no option to switch on and no port to open inside the terminal; the capability does not exist in the product.
What MQL4/MQL5 do offer is outbound networking. An Expert Advisor can call WebRequest() to poll an external server for new signals (after you allowlist the URL under Tools → Options → Expert Advisors), and it can open raw sockets. With enough work an EA can even host a listener on a local port of your machine. But a local listener is still not a webhook endpoint: TradingView, out on the public internet, cannot reach a process behind your home router.
Architecture matters here too. Orders are accepted by your broker's MetaTrader server; the terminal is only the client that submits them. Any automation therefore has to either drive a running terminal (the EA approach) or talk to the broker through an API bridge — which is exactly what cloud routing services do.
Can a listener EA on my own PC receive TradingView alerts?
Technically yes; practically it is the most fragile option available. The pattern: an EA or helper program listens on a local port, you configure port forwarding on your router so the internet can reach that port, and you give TradingView your home IP (or a dynamic-DNS name) as the webhook URL.
Each link in that chain is a failure mode you now own:
- Your home IP changes — most residential connections rotate addresses, so the webhook URL silently goes stale unless you maintain dynamic DNS.
- Port forwarding exposes your trading PC — you are publishing an open port to the entire internet, typically without proper TLS or authentication hardening.
- Everything must stay up at once — the PC, the terminal, the EA on its chart, the router config and your connection; a Windows update or a closed chart breaks the route without warning.
- Missed alerts are simply lost — if your endpoint is down when the alert fires, there is no queue waiting for your machine to come back.
Does a Windows VPS solve TradingView to MT5?
A VPS moves the problem rather than removing it. The standard recipe is a Windows VPS running a MetaTrader terminal plus a third-party bridge EA; a small web service receives the TradingView webhook and the EA places the trade inside the terminal. This does work — it is what most "TradingView to MT5" tools sold today actually are under the hood.
The costs are recurring and operational rather than one-off:
- Monthly VPS rent on top of whatever the bridge tool itself costs.
- The terminal must stay logged in 24/7 with the EA attached to a chart — terminal auto-updates, broker re-login prompts and VPS reboots all stop execution silently.
- You become a Windows server administrator: patching, RDP security, disk space, monitoring.
- Risk logic lives in EA input fields on one machine; nothing validates an order server-side before it reaches your broker.
How do you get TradingView alerts into MT5 without a VPS?
By giving TradingView a webhook URL that points at a service which already runs server-side and already speaks to your broker. With PipSync, you generate a unique per-account webhook URL in Settings → Advanced → TradingView Alerts (shown once), paste it into the alert's Webhook URL field, and put a small JSON payload in the alert message.
When the alert fires, PipSync's servers receive the POST, parse the payload and turn it into a signal on your Signals page. When you confirm it, your server-side risk rules — lot sizing, SL/TP mapping, max open trades — apply once you assign your MT5 account on the signal and confirm it, and the order goes to your MT5 account through an API bridge. No terminal-side EA, no open port at home, no Windows server to maintain, and execution continues when your computer is off. Because the webhook terminates at PipSync rather than at a terminal plugin, the TradingView side stays simple: alerts arrive as signals on the Signals page, or trade automatically if you opt in.
PipSync is an execution tool: it routes the alerts you create, it does not generate signals, and nothing on this page is investment advice.
Can TradingView alerts place trades on MT5 automatically?
Only if you opt in. Auto-trade is off by default and needs the Advanced plan: under Settings → Advanced → TradingView Alerts you give an explicit consent and click Set up auto-trading, then under Accounts & auto-trade you link your MT5 account and switch auto-trade on. Without that, every alert stays a signal for your approval.
With auto-trade on, the loss at the stop loss is capped at the channel risk, 0.5% of the account balance by default. If the risk cannot be measured on an account (the balance is unknown, there is no contract data, or the account is not held in USD for now — for now, auto-trade values the risk only for currency pairs: gold, indices, crypto and other CFDs on MT5, cTrader and Match-Trader accounts are not traded), or the broker's smallest lot would exceed the cap, that account is not traded. If every account was refused by these limits, the alert is kept as a signal for your approval; if the broker rejects the order on every account, the signal is marked rejected. Slippage and price gaps can make the actual loss larger than the cap. If the de-duplication service is unavailable, alerts are only saved as signals.
PipSync does not close positions from TradingView alerts: exits happen by stop loss, take profit or by you. An opposite-direction alert while a position opened by a TradingView alert is still open is held as a likely strategy exit and saved as a signal for your approval. A webhook from your own system — a bot, a script or another tool — is never traded automatically: it always becomes a signal for your approval. Only alerts that TradingView itself sends, from its published sender addresses, can auto-trade, and only after you opt in. An alert is traded automatically only when all of these hold:
- it is a JSON alert — plain-text alerts are always saved as a signal for your approval
- it comes from TradingView's published sender IP addresses
- it names no size of its own (for example lots, qty, contracts, size, volume, units, amount or risk) — otherwise it is a signal for your approval
- your Advanced plan is still active
- it is not a duplicate — TradingView retries are de-duplicated
- your workspace is under 5 automatic executions per minute
- no position in the same instrument opened by a TradingView alert is still open, in either direction
Parse for free, execute on a paid plan
Connect a signal source and watch PipSync parse in real time. Start on the Free plan at $0 with no card, or subscribe from $24/month for execution — charged at checkout, cancel any time.
Billed at checkout · Cancel any time · Free plan available
Risk warning: Trading CFDs and other leveraged products is complex and carries a high risk of losing money rapidly because of leverage. Industry data indicates that 70–80% of retail trading accounts lose money on these products. Risk disclosure · Past performance.
Frequently asked questions
Written by the PipSync team · Reviewed by PipSync Editorial, Editorial team · Published · Last updated
PipSync is a cloud-based signal automation platform that routes trading signals from Telegram, Discord, TradingView alerts and custom webhooks to broker accounts on MetaTrader 5, cTrader, Match-Trader, Binance Futures and Bybit — with server-side risk management and no VPS required. PipSync is an execution tool, not a signal provider and not investment advice.
PipSync is a signal execution tool. It does not provide trading signals, does not guarantee any trading results and is not investment advice. Trading leveraged products involves substantial risk of loss. See the full risk disclosure and performance disclaimer.