TradeAon · Guides · TradingView → MetaTrader
Webhooks · Getting started

How to send TradingView alerts to MetaTrader (MT4/MT5)

Updated · July 2026 · ~8 min read

TradingView is where a lot of traders build and test their strategies, but TradingView cannot place orders with your broker on its own. To turn a chart alert into a real position on MetaTrader 4 or 5, you need something that listens for the alert and executes it. This guide walks through exactly how that connection works and how to set it up end to end.

Key takeaways
Contents
  1. Why TradingView can't trade for you
  2. How the connection works
  3. What you need before you start
  4. Step 1 — Create a TradingView alert
  5. Step 2 — Add your webhook URL
  6. Step 3 — Format the alert message
  7. Step 4 — Install the EA
  8. Verifying the first trade
  9. Troubleshooting
  10. Frequently asked questions

01 Why TradingView can't trade for you

TradingView is a charting and analysis platform. It can watch the market, run your Pine Script strategy, and fire an alert when your conditions are met — but it has no direct connection to most retail brokers. It cannot log into your MetaTrader account and click "Buy" for you.

What it can do is send a message to the outside world the moment an alert fires. That message is called a webhook: a small HTTP POST request delivered to any URL you choose. The trick to automated trading is giving TradingView a URL that belongs to a service which knows how to talk to MetaTrader on your behalf.

02 How the connection works

The full path from chart to fill has three moving parts:

Because the EA lives inside MetaTrader and connects to the broker itself, you never hand over your broker password to anyone. The routing service only ever sees the order details you chose to send.

03 What you need before you start

Most traders keep the MetaTrader terminal on a low-cost VPS so it stays online around the clock — see our guide on keeping MetaTrader online 24/7.

04 Step 1 — Create a TradingView alert

Open the chart you want to trade, click the alarm-clock Alert icon, and set your condition. This can be a manual price cross, an indicator, or a signal from your Pine Script strategy. Under Notifications, tick Webhook URL. This is the box that turns a passive notification into an executable signal.

05 Step 2 — Add your webhook URL

Paste the webhook URL from your TradeAon dashboard into the Webhook URL field. Each account gets its own endpoint, so trades from different strategies never collide. The URL looks like this:

POST https://allinconnect.online/whk_mt4us30demo7

Keep this URL private — the license key in it is the credential that identifies your account, and TradeAon always validates it before touching your broker connection. If you want an extra layer, you can also turn on an optional secret field in your account settings; it's off by default, so nothing changes unless you set one.

06 Step 3 — Format the alert message

The alert message is where you describe the trade. TradeAon reads a small JSON object with a handful of fields:

{
  "symbol": "US30",
  "action": "BUY",
  "volume": 1.00,
  "stop_loss": 38500,
  "take_profit": 39000,
  "secret": "your-secret-here"
}

The action field accepts BUY, SELL, CLOSE, CLOSE_ALL, CLOSE_BUY and CLOSE_SELL, so a single strategy can both open and manage positions. Market execution is the default; pending orders (Buy/Sell Limit and Buy/Sell Stop) are also supported by adding order_type and price fields to the same payload. If your broker names the symbol differently (for example GOLD instead of XAUUSD), automatic symbol mapping resolves it for you — see symbol mapping explained. For the full field reference and how to build the message from a Pine Script strategy, read TradingView webhook JSON syntax.

07 Step 4 — Install the EA

Download the TradeAon Expert Advisor from your dashboard and drop it onto any chart in MetaTrader. Open its inputs, paste your license key, and allow live/algo trading. The EA connects back to the routing service, confirms your account, and begins listening for signals. One EA handles both webhook execution and copy trading, so you don't need a separate tool for each.

08 Verifying the first trade

Back in TradingView, use the alert's "Test" or trigger the condition manually. Within a second or two you should see the order appear in MetaTrader, and a matching entry in your TradeAon event log. The dashboard shows every signal it received, whether it was accepted, and how it was executed — which makes it easy to confirm the pipe is connected before you trust it with a live strategy.

09 Troubleshooting

A fuller list is in common webhook errors and how to fix them.

10 Frequently asked questions

Do I need to know how to code? No. If you can write a TradingView alert and copy a JSON snippet, you can send signals. Pine Script only matters if you want a strategy to build the message dynamically.

Is my broker password shared? No. The EA connects to your broker from inside MetaTrader; the routing service only ever handles the order details you send.

Can one alert trade several accounts? Yes — that is what copy trading is for. See copying trades between brokers.

TradeAon is a technical automation tool, not financial advice. Trading involves substantial risk of loss. You are responsible for your own strategy, risk and capital.