TradingView Webhook URL EA: Complete MT5 Setup Guide 2026

TradingView webhook URL connecting to MetaTrader 5 Expert Advisor

The TradingView webhook URL is how TradingView talks to the outside world — and pairing it with an MT5 Expert Advisor (EA) is what makes fully automated trading possible. This guide covers everything: how webhooks work, what JSON to send, how to configure your EA, and why TradingView Copier Pro is the easiest way to get it all working seamlessly.

📌 Prerequisites: A TradingView paid plan (Essential or above), MetaTrader 5 installed, and TradingView Copier Pro installed on Windows.

How TradingView Webhooks Work

When a TradingView alert condition is met, TradingView can send an HTTP POST request to any URL you specify. This is called a webhook. The POST contains a JSON body — your custom message — which TradingView sends exactly as you write it in the alert message field.

According to TradingView's official webhook documentation, webhooks are available from the Essential plan and above. The URL must be publicly accessible over HTTPS — which is why you need either a VPS or a tunneling tool like the one built into TradingView Copier Pro.

The Webhook URL: How TradingView Copier Pro Provides It

Normally, setting up a public webhook URL requires either:

TradingView Copier Pro handles this automatically. The built-in Cloudflare Tunnel creates a publicly accessible HTTPS URL from your Windows PC with zero configuration. You just copy the URL displayed in the app and paste it into TradingView.

JSON Message Format Reference

The message you put in TradingView's alert message field becomes the JSON body of the webhook POST. TradingView Copier Pro reads this JSON and its EA executes accordingly. There is no lot-size field: the EA calculates position size from each account's risk setting, and exits are sent by your strategy's close alerts.

Basic BUY/SELL Order

{"action":"BUY","symbol":"EURUSD"}

Order With a Stop Price (used for position sizing)

{"action":"BUY","symbol":"EURUSD","sl":"1.0850"}

Risk-Based Lot Sizing (risk % or $ is set per account in the app)

{"event":"entry","side":"short","ticker":"XAUUSD","sl":"2655.50"}

Close All Positions

{"action":"CLOSE","symbol":"EURUSD"}

Supported Action Parameters

ParameterValuesDescription
actionBUY, SELL, CLOSE, CLOSE_BUY, CLOSE_SELL, CLOSE_PARTIALTrade direction or close command
symbolAny MT5 symbol stringThe instrument to trade
evententry, close, close_partialAlternative to action, used together with side
sidelong, shortTrade direction when event is used
tickerAny symbol stringAlternative to symbol
slPriceStop price, used to calculate position size for percentage or fixed-dollar risk (not attached at the broker by default)
qtyPercentage (1–100)Share of the position to close with close_partial

Setting Up the Expert Advisor in MT5

TradingView Copier Pro auto-installs the TV_Copier Expert Advisor into your MT5 data directory. After installation:

  1. Open MetaTrader 5
  2. Press F5 to refresh the Navigator panel
  3. Find TV_Copier under Expert Advisors
  4. Drag it onto any chart (it doesn't matter which symbol)
  5. In the EA settings, ensure Allow Algo Trading is ticked
  6. Click the AutoTrading button in the MT5 toolbar (it should turn green), then allow WebRequest for http://127.0.0.1:3000 in MT5's options

Using Pine Script Variables in Your Webhook

TradingView alerts support dynamic placeholder variables in the message body. These are extremely powerful — you can send the actual price, bar time, or any strategy variable as part of the webhook JSON.

{"action":"BUY","symbol":"{{ticker}}","price":{{close}}}

The {{ticker}} and {{close}} placeholders are replaced by TradingView with the actual values when the alert fires. This is useful for strategies that calculate values such as the stop price dynamically in Pine Script.

Connecting Multiple Alerts to One Webhook

You can point unlimited TradingView alerts at the same webhook URL. TradingView Copier Pro processes each one independently, routing BUY commands to BUY trades and CLOSE commands to position closes — all based on the action field in the JSON. This means you can run an entire multi-symbol strategy from a single webhook endpoint.

Get Your TradingView Webhook URL in Minutes

TradingView Copier Pro sets up the whole pipeline for you — webhook URL, EA, Cloudflare tunnel. No coding required.

Get TradingView Copier Pro →

Troubleshooting Webhook Issues

For more detailed troubleshooting, see our support page or read about why MT5 trades can be slow and how to fix it.

Frequently Asked Questions

What is a TradingView webhook URL EA?

It's the two-part bridge: the webhook URL is where TradingView POSTs your alert JSON, and the EA is the MetaTrader 5 Expert Advisor that receives those instructions and places orders. Together they turn chart alerts into live trades automatically.

Where do I get a webhook URL for my EA?

The copier app generates it — typically via a built-in Cloudflare tunnel, so no port forwarding or static IP is needed. You copy the URL from the app's dashboard into the 'Webhook URL' field of any TradingView alert.

Is it safe to expose a webhook URL publicly?

Reasonably, with precautions: the URL is a long random string (unguessable in practice), good copiers validate the JSON structure, and you can set a daily drawdown limit and a maximum number of trades per day (both block new entries for the rest of the day) to help limit what a malicious payload could do. Never post your webhook URL publicly.