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 persistent, 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's EA reads this JSON and executes accordingly.

Basic BUY/SELL Order

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

Order With SL/TP (in pips)

{"action":"BUY","symbol":"EURUSD","lot":0.1,"sl":50,"tp":100}

Risk-Based Lot Sizing

{"action":"SELL","symbol":"XAUUSD","lot":1.0,"lot_type":"percent_balance"}

Close All Positions

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

Supported Action Parameters

ParameterValuesDescription
actionBUY, SELL, CLOSE, CLOSE_BUY, CLOSE_SELLTrade direction or close command
symbolAny MT5 symbol stringThe instrument to trade
lotDecimal numberLot size or risk percentage
lot_typefixed, percent_balanceHow to interpret the lot value
slInteger (pips)Stop loss in pips from entry
tpInteger (pips)Take profit in pips from entry
commentAny stringTrade comment in MT5

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)

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}}","lot":0.1,"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 lot sizes 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.