# TradingView webhook to MT5 — signals you review, or opt-in auto-trade

Source: https://pipsync.io/en/tradingview-to-mt5
Last updated: 2026-06-07

MetaTrader 5 has no inbound webhook endpoint, so a TradingView alert cannot reach an MT5 terminal directly. PipSync closes that gap: it generates the webhook URL you paste into TradingView's alert dialog and turns every valid alert into a signal on the Signals page, from the cloud — no VPS, no EA, no bridge software. By default PipSync places no order from an alert: you assign your MT5 account on the signal and confirm it. Auto-trade is opt-in and off by default: on the Advanced plan, a JSON alert that passes every safety check is placed on your linked accounts without approval (the broker can still reject it).

Each alert carries a small JSON message with the instrument, direction, entry, stop-loss and take-profit. TradingView POSTs it to your private PipSync URL, PipSync validates it, and a valid alert appears as a signal on the Signals page for you to review. To let alerts trade, set up auto-trade under Settings → Advanced → TradingView Alerts with an explicit consent, then link your accounts and switch it on under Accounts & auto-trade. The same webhook handles single price alerts and strategy alerts.

## TradingView → MT5 at a glance

| | |
|---|---|
| Signal source | TradingView alerts — indicator alerts, price alerts or strategy order events, delivered as webhook POSTs; each valid one becomes a signal |
| TradingView requirement | A paid TradingView plan — TradingView's free plan does not support webhook notifications |
| Destination platform | MetaTrader 5 — live in PipSync; hedging and netting accounts, server-side SL/TP |
| Webhook URL | Unique secret URL per workspace, generated under Settings → Advanced → TradingView Alerts; regenerable if it ever leaks |
| Payload format | JSON with instrument, direction (buy/sell), entry, sl and tp1 — all required, sl/tp above 0; TradingView placeholders like {{ticker}} fill values automatically |
| Infrastructure | Fully cloud-based — no VPS, no EA, nothing installed in your MT5 terminal |
| Auto-trade | Opt-in and off by default: 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); slippage and price gaps can exceed it |
| Price | Webhook integration needs a plan that includes it (the Advanced plan) |

## How do I connect a TradingView webhook to MT5?

You configure the PipSync side once, then reuse the same webhook URL in every TradingView alert you create.

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 includes webhook integration (payment method required, cancel any time). It covers everything required to wire up and test the TradingView webhook before you go live.
2. **Generate your webhook URL** — In the dashboard, go to Settings → Advanced → TradingView Alerts and click Generate webhook URL. PipSync creates a unique URL with a secret token and shows it only once. Copy it and treat it like a password — anyone holding it can send signals into your workspace and, once auto-trade is on, trigger trades. Regenerate it if you suspect a leak.
3. **Connect your MT5 account** — Open Trading Accounts → Add account and choose MetaTrader 5, using your master (trading) password. PipSync executes server-side, so there is no EA to install and your terminal does not need to stay open. Start with a demo account.
4. **Create a TradingView alert with a JSON message** — In TradingView, open the alert dialog (Alt+A), set your condition, and paste PipSync's JSON template into the Message field. Use real stop-loss and take-profit prices — an alert with 0 is rejected — and add no size field such as lots: an alert that names its own size is never auto-traded. Placeholders such as {{ticker}}, {{close}} and {{strategy.order.action}} are filled in by TradingView when the alert fires.
5. **Paste the webhook URL into the alert** — In the same dialog, scroll to Notifications → Webhook URL and paste your PipSync URL, then click Create. From now on, every time this alert triggers, TradingView POSTs the JSON to PipSync.
6. **Fire a test alert before going live** — Fire the alert once, then open Settings → Advanced → TradingView Alerts and check Recent alerts: each call is listed with its status and, if it was rejected, the exact error. A valid alert shows up on the Signals page. Use an MT5 demo account while you test.
7. **Optional: switch on auto-trade** — Once a few alerts have parsed 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.

## Why can't TradingView send webhooks straight to MT5?

Because a webhook needs a server that listens for incoming HTTP requests, and the MT5 terminal is a desktop application with no inbound endpoint. TradingView can only POST an alert to a public URL — there is nothing in MetaTrader 5 for it to call.

The traditional workaround is to rent a Windows VPS, keep an MT5 terminal running on it 24/7, and install an EA plus a local bridge that receives the webhook and relays it to the terminal. That stack is fragile and entirely yours to maintain. PipSync replaces it: the webhook endpoint, the parsing and the order routing all run on PipSync's servers, and orders are sent to MT5 through its API bridge. If you want the deeper background on why MetaTrader has no native webhook support, the MetaTrader webhook guide linked below covers MT4 and MT5 in detail.

## What JSON do I put in the TradingView alert message?

A small object with five required fields: instrument, direction, entry, sl and tp1. direction is buy or sell (long and short also work); instrument is the chart symbol, for example {{ticker}} — PipSync upper-cases it and keeps only letters and digits, and there is no symbol-mapping setting, so if your broker spells it differently, message the support chat.

entry, sl and tp1 must be prices above 0 — 0 is rejected, not read as market (use tp1 to tp5 for several targets). comment is ignored. A size field never sets the size: an alert that names its own size or risk (for example lots, qty, contracts, size, volume, units, amount or risk) is not auto-traded and is saved as a signal for your approval. TradingView placeholders make the message dynamic: {{ticker}} inserts the chart symbol, {{close}} the current price, and {{strategy.order.action}} the direction of a strategy order. Only JSON alerts can auto-trade; a plain-text alert is always saved as a signal for your approval.

- instrument — required: the chart symbol, for example {{ticker}}
- direction — required: buy or sell (long and short also work)
- entry — required: entry price, above 0
- sl — required: stop-loss price, above 0
- tp1 — required: at least one take-profit price, above 0
- comment — ignored; there is no close action
- lots, qty, contracts, size, volume, units, amount or risk — never used for sizing; an alert carrying one is not auto-traded

## Can I automate a full TradingView strategy, including exits?

Entries yes, exits no. Set your alert condition to the strategy's order fills and use {{strategy.order.action}} in the JSON so the same alert sends buy when your strategy goes long and sell when it goes short, with your levels as entry, sl and tp1. Each valid alert becomes a signal for you to review, or, with auto-trade on, is placed when it passes every check.

PipSync does not close positions from TradingView alerts: a direction other than buy or sell is rejected. While a position in the same instrument opened by a TradingView alert is still open, a new alert for that instrument is not traded, in either direction; an opposite-direction alert is held as a likely strategy exit and saved as a signal for your approval. Exits happen by the stop loss, the take profit, or by you in PipSync and your broker platform.

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

## Do I need a paid TradingView plan for webhooks?

Yes. Webhook notifications are a paid TradingView feature — TradingView's free plan can show alerts on screen but cannot POST them to a URL. This is a TradingView limitation, not a PipSync one.

PipSync's webhook integration needs a plan that includes it (the Advanced plan).

## What happens between the alert firing and the signal?

TradingView POSTs your JSON to the PipSync webhook URL, PipSync parses and validates it, and a valid alert is saved as a signal named TradingView Alert on the Signals page, scored like any other signal. Invalid alerts are answered with HTTP 422 and the reason is listed under Recent alerts.

Unless you have switched on auto-trade, PipSync does not open the trade itself — open the signal on the Signals page to review it; when you confirm it, sizing follows your settings (fixed lots or percent-risk, min/max lots, max open positions). With auto-trade on, an alert that passes every check is placed on your linked accounts with the loss at the stop loss capped at the channel risk; one that does not is saved as a signal for your approval. Because all of this runs in the cloud, the pipeline keeps working when your computer is off — there is no VPS to babysit.

## How do I test the webhook before going live?

Fire the alert once, then open Settings → Advanced → TradingView Alerts and look at Recent alerts, which lists the last 20 alerts received on your URL with their status and, if one was rejected, the exact error. A valid alert shows up on the Signals page.

For the first real alerts, use an MT5 demo account and keep auto-trade off, so every alert stays a signal you review. Switch to your live account, or switch on auto-trade, only after a few alerts have parsed exactly as expected.

## FAQ

### Can MetaTrader 5 receive TradingView webhooks directly?

No. MT5 is a desktop terminal with no inbound HTTP endpoint, so TradingView has no URL to send the alert to. You need a hosted endpoint in between — PipSync provides that endpoint and turns each valid alert into a signal from the cloud.

### How do I get a webhook URL for TradingView?

In the PipSync dashboard, go to Settings → Advanced → TradingView Alerts and click Generate webhook URL. PipSync generates a unique URL containing a secret token and shows it only once; you paste it into the Webhook URL field of any TradingView alert. Keep it secret: with auto-trade on, anyone who has it can trigger trades. Regenerate it on the same screen if you suspect a leak.

### What fields does the TradingView webhook payload need?

Five fields are required: instrument, direction (buy or sell), entry, sl and tp1, with sl and tp above 0 — an alert with 0 is rejected. comment is ignored, and an alert that names its own size (for example lots) is never auto-traded. TradingView placeholders like {{ticker}}, {{close}} and {{strategy.order.action}} fill values automatically. Only JSON alerts can auto-trade; plain-text alerts are always saved as a signal for your approval.

### Do TradingView webhooks work on the free TradingView plan?

No. Webhook notifications require a paid TradingView plan. The free TradingView plan can display alerts but cannot send them to a URL. PipSync's webhook integration needs a plan that includes it (the Advanced plan).

### Can a TradingView alert close my MT5 position?

No. PipSync does not close positions from TradingView alerts: a direction other than buy or sell is rejected, and an opposite-direction alert while a position opened by TradingView is still open is held as a signal for your approval. Exits happen by the position's stop loss, take profit, or by you in PipSync and your broker platform.

### Do I need a VPS or an EA to connect TradingView to MT5?

No. PipSync hosts the webhook endpoint server-side, so there is no Expert Advisor to install and no terminal that has to stay online. The pipeline runs entirely in the cloud and keeps executing when your computer is off.

### Can I run TradingView alerts on a prop-firm MT5 account?

Technically yes — PipSync connects any MT5 account, and server-side rules like percent-risk sizing, min/max lots and max open positions help you keep trade size within limits you set. Prop-firm rules differ per firm, however, so verify with your firm that automated or webhook-driven execution is allowed before going live.

## Related

- [What is a TradingView webhook?](https://pipsync.io/en/what-is-a-tradingview-webhook)
- [Connect Claude & ChatGPT to MT5 — trade by asking, via MCP](https://pipsync.io/en/claude-chatgpt-to-mt5)
- [MCP quickstart — connect Claude or ChatGPT to PipSync in minutes](https://pipsync.io/en/mcp-quickstart-guide)
- [Why MetaTrader has no inbound webhook (and how to automate TradingView alerts anyway)](https://pipsync.io/en/metatrader-webhook)
- [TradingView to MT4 — coming soon, without a VPS](https://pipsync.io/en/tradingview-to-mt4)
- [TradingView to cTrader — signals you review, or opt-in auto-trade](https://pipsync.io/en/tradingview-to-ctrader)
- [Webhook to MT5 — send JSON signals from any system](https://pipsync.io/en/webhook-to-mt5)
- [Telegram to MT5 — copy signals to MetaTrader 5 automatically](https://pipsync.io/en/telegram-to-mt5)
- [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.
