# TradingView to MT5: EA Bridge vs Hosted API

> Two ways to turn TradingView alerts into MetaTrader 5 trades: an Expert Advisor bridge on a VPS, or a hosted alert URL. Setup, upkeep and failures compared.

Published 2026-10-11 by fxapis. Canonical: https://fxapis.com/blog/tradingview-to-mt5-ea-bridge-vs-hosted-api

## In short

- TradingView can send an alert to a URL, but it cannot log in to MetaTrader 5. Something has to receive the alert and place the order.
- An EA bridge puts an Expert Advisor in a running MT5 terminal — usually on a Windows VPS — that picks the alerts up and trades them.
- A hosted API gives you an alert URL. TradingView posts to it and the order is placed on your MT5 account, with no EA, VPS or terminal of yours.
- Either way, check three things: duplicates are traded once, symbols match your broker's names, and you can see why an alert did not trade.

TradingView is where many strategies live; MetaTrader 5 is where many brokers are. Getting an alert from one to an order in the other needs a bridge. **An EA bridge runs that bridge inside your own MT5 terminal. A hosted API runs it for you.** The trade-off is upkeep against control.

## The problem both solve

When an alert fires, TradingView can send an HTTP request to a URL you give it. It cannot add an `Authorization` header, so it cannot call an ordinary trading API with a key — and it cannot reach into MetaTrader at all. Something has to receive the alert, decide what it means, and place the order.

## Option 1: an Expert Advisor bridge

The common setup:

1. A small service receives TradingView's webhook — yours, or the bridge vendor's.
2. An **Expert Advisor** in your MT5 terminal fetches or receives each alert.
3. The EA places the order from inside the terminal.

Because the EA lives in the terminal, the terminal must be running and logged in whenever an alert can fire. In practice that means a **Windows VPS** that you keep up: the terminal, the EA and its settings, restarts, and re-logins after the broker drops the connection.

It suits traders who already run an EA, want full control of the logic in MQL5, and are comfortable looking after a server.

## Option 2: a hosted alert URL

With fxapis, you create a **TradingView hook** in the console: choose the MT5 account, a default volume, and how your broker names symbols. You get a secret URL. Paste it into the alert's webhook field, put the order in the message, and the alerts that fire are traded on your account:

```text
TradingView alert fires
  → POST https://api.fxapis.com/hooks/tradingview/<secret>   answered at once
  → the order is placed on your MT5 account
  → the alert and its result appear in the console
```

The terminal runs in fxapis's cloud. There is no EA, no VPS, and no server of yours.

## Compared

| | EA bridge | Hosted alert URL (fxapis) |
|---|---|---|
| Setup | Install the terminal and EA, configure the relay | Create a hook, paste its URL into the alert |
| Must stay running | Your terminal, usually on a VPS | Nothing of yours |
| Where the logic lives | In the EA (MQL5) | In the alert message |
| Several accounts per alert | One terminal per account | One multi-account order, on plans that include it |
| Updates and re-logins | Yours | The provider's |
| Typical failure points | VPS down, terminal logged out, EA stopped, relay unreachable | Wrong symbol mapping, plan limits, account offline |

## What to check in any bridge

**Duplicates.** Alerts can arrive twice. fxapis trades each alert `id` once — the templates fill it with `{{timenow}}` — and logs repeats as duplicates. Without an id, the same message twice within 60 seconds counts as one.

**Symbols.** TradingView's `OANDA:XAUUSD` may be `XAUUSD.a` at your broker. A hook can map symbols one by one or add a suffix to all of them.

**Speed.** TradingView cancels a webhook request that takes longer than three seconds, so the receiver must answer at once and trade afterwards. Keep the account always connected if every second counts; an account that comes online on demand first takes about 10 seconds to connect in our measurements.

**Visibility.** You will want to know why an alert did not trade. fxapis lists every alert that reaches a hook with what became of it — sent, refused, ignored or duplicate — and the reason in plain words.

**Who can send.** A hook URL is a credential. By default an fxapis hook accepts requests only from TradingView's published webhook addresses, and you can rotate the URL at any time.

## Next steps

- [TradingView alerts to MT5](https://fxapis.com/tradingview) — what the hosted alert URL does, and what it costs.
- [The TradingView guide](https://docs.fxapis.com/guides/tradingview) — creating a hook, message formats for indicators and strategies, closing, and troubleshooting.

## Questions

### Can TradingView place trades on MT5 directly?

Not on its own. TradingView can send a webhook when an alert fires, but it cannot add an Authorization header or run code in MetaTrader. A bridge — an EA in a terminal, or a hosted service — receives the alert and places the order.

### Do I need a VPS to send TradingView alerts to MT5?

Only with an EA bridge, which needs a terminal that is always running. With a hosted alert URL such as fxapis's, the terminal runs in the provider's cloud and nothing of yours has to stay on.

### Which TradingView plan supports webhooks?

TradingView lists webhook notifications on its paid plans, not on Basic, and sends webhooks only from accounts with two-factor authentication enabled (TradingView help centre and pricing page, checked 30 September 2026).

### What happens if TradingView sends the same alert twice?

With fxapis it is traded once. Put a unique id in the alert message — the templates use {{timenow}} — and a repeat of that id is logged as a duplicate and not sent.
