# How to send TradingView alerts to MetaTrader 5

TradingView can tell you when your indicator, strategy or line fires, but it cannot place the trade in MetaTrader 5 by itself. This guide covers the ways people get from a TradingView alert to an order in MT5, what each one needs, and how it is done with Relay2Trade, step by step, from a new account to an alert trading on Auto.

## Why an alert does not trade by itself

TradingView runs your alerts on its own servers. When one fires, it can show a pop-up, send an email or a phone notification, or post its message to a web address you give it (a "webhook"). MetaTrader 5 runs on a computer: on yours, or on one in a data centre. Nothing connects the two unless something receives the alert and places the order.

Trading an alert by hand works while you are at the screen: the notification comes, you open MetaTrader 5, find the symbol under your broker's name, work out the size, type the stop-loss and take-profit, and place it. It falls short in the same places as copying any signal by hand: the price moves while you type, alerts fire at night and at weekends, and an exit alert you miss leaves a position open.

## The ways to connect TradingView to MT5

- **By hand.** Free, and every trade is your own click. It works only while you watch.
- **An Expert Advisor inside MetaTrader.** An EA asks a web service for new alerts every few seconds and places them. It trades while that MetaTrader is running, and its settings live in the EA's inputs.
- **A cloud service that trades for you.** The alert goes to a company's server, which places the order through a connection to your broker. Nothing runs on your side, but the service holds your account's login.
- **An app that receives the alert and trades your own MetaTrader 5.** The alert goes to an address, and an app on your computer or VPS places the order in your MetaTrader 5, by your settings. Your broker password stays on the machine that runs the app.

Relay2Trade works the last way. Its app runs on your Windows PC or Linux machine, or on a VPS set up from the Desk, and the same app also copies Telegram signals if you follow groups.

## What you need

- **A TradingView plan that sends webhooks.** TradingView sends alerts to an address only on its paid plans, and only once two-factor authentication (2FA) is on in your TradingView account.
- **A MetaTrader 5 account at any broker**, live or demo: its number, its trading password and its server name. Start on a demo account.
- **A place where the app runs**: a VPS set up from the Desk, a Windows 10 or 11 PC, or a Linux machine. Alerts fire at any hour, so a VPS or a computer that stays on is the usual choice. See https://relay2trade.com/help/run-a-signal-copier-24-7.md.
- **A Relay2Trade account with a plan that includes TradingView alerts.** The plans page says which do.

## Step by step with Relay2Trade

1. **Create your account** at relay2trade.com and open the Desk.
2. **Get the app running**: the "VPS: Quick install" from the Desk, or the app on your own computer. See https://relay2trade.com/help/where-the-app-runs.md.
3. **Connect MetaTrader 5**: your account number, password and server, typed in the Desk. The app starts its own MetaTrader for it. See https://relay2trade.com/help/connecting-metatrader.md.
4. **Add a TradingView listener**: in Connections, press "+ Add", choose "TradingView alerts", give it a name and, if your alerts do not name their symbol, the symbol it trades. Telegram does not have to be connected.
5. **Answer "What sends the alert?"** in its setup: a strategy, an indicator, or a line or a price. The setup shows only what that kind needs, with pictures of TradingView's own alert window.
6. **Copy your address** ("Your address for TradingView") and paste it into the alert's "Webhook URL" in TradingView, under "Notifications". Keep "Notification schedule" on 24/7.
7. **Send a test alert** from the setup. It goes all the way to your app, which says what it would place with your settings now. Nothing is placed.
8. **Watch it, then let it trade.** A new listener starts on "Watch": real alerts are read and shown in its log, and nothing is traded. Once a test has gone through, switch it to "Manual" (each alert waits for your approval) or "Auto".

The full walk-through, with TradingView's screens, is at https://relay2trade.com/help/tradingview-alerts.md.

## Which messages work

You usually do not write anything. A strategy's own message ("order buy @ 1 filled on XAUUSD. New strategy position is 1") is read exactly, with its exits, partial exits and reversals. Lines written for PineConnector are read with the same meaning. JSON from other tools and short commands ("buy", "SELL XAUUSD", "close long") work too. An indicator whose alerts say nothing about the side uses two addresses: the Buy address on its buy alert and the Sell address on its sell alert.

Nothing is guessed. An alert that does not clearly say buy, sell or close is not traded, and its log says so. Every format, with examples, is at https://relay2trade.com/help/tradingview-alert-messages.md.

## What stays in your hands

The alert says what to do; your settings say how far it may go. The size (unless you let the alert set it within a cap), the maximum lots, the daily loss and profit lines, trading hours and the symbol lists apply to every alert, as they do to Telegram signals. Auto with no stop-loss anywhere asks you to confirm it first. See https://relay2trade.com/help/tradingview-settings-and-limits.md.

## When things go wrong

- **The app was off.** You are told at once. An entry waits up to your "Max signal age"; an exit waits until the app is back, so a position is not left open because its exit came while the app was off.
- **The alert never shows in the log.** Check the whole address is in "Webhook URL", that 2FA is on in TradingView, and that the alert has not expired or stopped.
- **The alert shows but was not traded.** The log says why and names the setting that decided.

## Trying it

Create an account and use the free demo day, while it is offered: the "VPS: Quick install" comes with it, free for the day. Add a TradingView listener on a demo account, send a test alert, then let a real alert fire on "Watch". See https://relay2trade.com/help/getting-started.md.

## Related

- https://relay2trade.com/help/tradingview-alerts.md
- https://relay2trade.com/help/tradingview-to-mt5-bridge-what-to-look-for.md
- https://relay2trade.com/help/tradingview-strategy-alerts-to-mt5.md
- https://relay2trade.com/help/tradingview-alert-messages.md
- https://relay2trade.com/help/run-a-signal-copier-24-7.md
