# Why MetaTrader has no inbound webhook (and how to automate TradingView alerts anyway)

Source: https://pipsync.io/en/metatrader-webhook
Last updated: 2026-06-07

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.

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

| | |
|---|---|
| Inbound webhook support in MT4/MT5 | None — the terminal is a desktop client with no public HTTPS endpoint for TradingView to POST to |
| What MQL EAs can do | Outbound only: WebRequest() polling to allowlisted URLs and local socket listeners — not reachable from the public internet |
| TradingView requirement | Webhook alerts require a paid TradingView plan; the free TradingView plan cannot send webhooks |
| PipSync webhook URL | Unique per account (pipsync.io/api/tradingview/webhook/<secret-token>); keep it secret and regenerate it if you suspect a leak |
| Alert payload | JSON with instrument, direction, entry, sl and tp1 (sl and tp must be above 0); only JSON alerts can auto-trade, and a plain-text alert is always saved as a signal for your approval |
| Auto-trade | Opt-in and off by default (Advanced plan): JSON alerts from TradingView's own addresses only, with the loss at the stop loss capped at the channel risk (0.5% of the balance by default); a webhook from your own system is never traded automatically; slippage and price gaps can exceed it |
| Infrastructure you run | None — no VPS, no bridge EA, no port forwarding; parsing, risk checks and execution are server-side |
| Price | Webhook integration needs a plan that includes it (the Advanced plan); billed at checkout |

## 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.

1. **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.
2. **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.
3. **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.
4. **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.
5. **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.
6. **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.

## 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

## FAQ

### Does MetaTrader 5 have a webhook URL?

No. Neither the MT5 terminal nor your broker exposes an inbound HTTP endpoint that TradingView could POST an alert to. A "webhook for MT5" always means a third system: a service that receives the webhook on a public URL and then places the order on your account.

### Why does MetaTrader have no webhook support?

MetaTrader's terminal was designed as a desktop client that connects outward to the broker's server, and MetaQuotes never built an inbound HTTP listener into it. MQL programs can make outbound WebRequest() calls and open sockets, but a process on a home PC behind NAT is not addressable from the public internet, so it can never act as a webhook receiver.

### Can I send TradingView alerts to MT5 without a VPS?

Yes. Point the alert's webhook URL at a cloud service like PipSync: TradingView POSTs the alert to PipSync's servers, which turn it into a signal; once you confirm it, your risk rules apply and PipSync places the order on your MT5 account. If you opt in to auto-trade on the Advanced plan, a JSON alert that passes every safety check is placed without that confirmation. Nothing runs on your machine — no VPS, EA or port forwarding — and execution continues when your computer is off.

### Do TradingView webhooks work on TradingView's free plan?

No. Webhook notifications are a paid TradingView feature; TradingView's free plan can trigger alerts but cannot deliver them to a webhook URL. The paid requirement sits entirely on the TradingView side — a PipSync plan that includes webhook integration (the Advanced plan) covers generating the webhook URL and testing it against a demo account.

### What should my TradingView alert message look like for MT5?

A small JSON object. PipSync expects instrument (e.g. EURUSD), direction (buy or sell), entry, sl and tp1, where sl and tp must be above 0. Add no size field such as lots: an alert that names its own size is never auto-traded. Only JSON alerts can auto-trade; a plain-text alert is always saved as a signal for your approval. TradingView placeholders such as {{ticker}} and {{close}} fill the values automatically when the alert fires.

### Is a webhook URL safe to share?

Treat it like a password. The URL contains a secret token, so anyone who has it can send signals to your account and, with auto-trade on, trigger trades: keep it out of public Pine scripts and screenshots, and regenerate it under Settings → Advanced → TradingView Alerts if you suspect a leak. By default every valid alert waits on the Signals page for your confirmation before any trade is placed.

### Can TradingView alerts trade on MT5 automatically?

Only if you opt in. Auto-trade is off by default and needs the Advanced plan: you set it up under Settings → Advanced → TradingView Alerts with an explicit consent (Set up auto-trading), then link your accounts and switch it on under Accounts & auto-trade. Without that, every alert stays a signal for your approval. PipSync does not close positions from TradingView alerts: exits happen by stop loss, take profit or by you.

### Can a webhook from my own system trade MT5 automatically?

No. 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.

### Is PipSync a signal provider or an EA?

Neither. PipSync is the cloud middle layer between TradingView and your broker: it receives the webhooks you configure, turns them into signals you confirm (or trades them automatically if you opt in), applies your server-side risk rules, and routes the resulting MT5 orders. It generates no signals of its own and makes no claims about trading outcomes — nothing on this page is investment advice, and trading leveraged products carries substantial risk.

## Related

- [What is a TradingView webhook?](https://pipsync.io/en/what-is-a-tradingview-webhook)
- [Webhook to MT4 — coming soon, send JSON signals](https://pipsync.io/en/webhook-to-mt4)
- [TradingView webhook to MT5 — signals you review, or opt-in auto-trade](https://pipsync.io/en/tradingview-to-mt5)
- [TradingView to MT4 — coming soon, without a VPS](https://pipsync.io/en/tradingview-to-mt4)
- [Webhook to MT5 — send JSON signals from any system](https://pipsync.io/en/webhook-to-mt5)
- [TradingView to cTrader — signals you review, or opt-in auto-trade](https://pipsync.io/en/tradingview-to-ctrader)
- [Signal copier with no VPS — execution runs in the cloud](https://pipsync.io/en/signal-copier-no-vps)
- [Server-side risk management — trading rules enforced before your broker](https://pipsync.io/en/server-side-risk-management)

---

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.
