TradingView Webhook Setup Guide

Use this after you create a webhook in the portal. It shows the exact webhook URL to paste in TradingView, how to add routes, and what message to put in your TradingView alert.

You need a paid TradingView plan with two-factor authentication turned on: TradingView only sends webhooks from those accounts.

Tip: Click “Print / Save PDF”

Quick Details (copy/paste)

Webhook URL
Webhook ID
Back to Dashboard
If you want a PDF: click Print / Save PDF and choose Save as PDF.

1) Add route(s) (in the portal)

  1. Dashboard → Automations → Webhooks & routes
  2. On this webhook click + Add route
  3. Choose where the trade goes: an Indian broker (Zerodha, Dhan, Fyers, Angel One, Upstox, Groww, Alice Blue, Shoonya), a crypto exchange (Delta Exchange, Binance, Bybit, OKX, KuCoin, BitMEX), MetaTrader 5, or Telegram / Discord for notifications only
  4. Enter the API details it asks for and save. To practise first, tick Paper Trading (Binance, Bybit, Delta Exchange, Fyers or Dhan): no API keys and no real orders.
One webhook can have several routes (for example Binance Futures + MT5); each alert goes to all of them unless the message targets one with R=. Indian brokers need a static IP whitelisted under SEBI's algo rules.

2) Create the TradingView Alert

  1. Open TradingView chart → click Alert (bell) → Create Alert
  2. In Notifications tab, paste the Webhook URL
  3. In Message tab, paste one of the formats below
  4. Save and enable the alert
TradingView Create Alert dialog

Create Alert dialog – use Notifications tab for Webhook URL, Message tab for alert format.

Webhook URL in Notifications tab

Paste your webhook URL in the Webhook URL field.

Message field in TradingView alert

Paste your alert format (e.g. Buy BTCUSDT Q=0.01) in the Message field.

MT5 Setup (only for a "MetaTrader (EA on your terminal)" route)

  1. Add a MetaTrader (EA on your terminal) route with your MT5 account number
  2. Download the EA and install it on your MT5 terminal
  3. Turn Algo Trading on and allow WebRequest for the URL below
A MetaTrader Direct route needs none of this: no EA and no terminal.
MT5 WebRequest whitelist URL should be your server base URL (shown above).

3) TradingView Alert Message (copy/paste)

Choose based on your TradingView alert type:

Strategies — Use dynamic placeholders. TradingView fills {{ticker}} and {{strategy.order.contracts}} when your strategy executes.
Long {{ticker}} Q={{strategy.order.contracts}} SL=2% TP=5%
JSON (optional):
{
  "action": "{{strategy.order.action}}",
  "symbol": "{{ticker}}",
  "quantity": {{strategy.order.contracts}},
  "price": {{strategy.order.price}},
  "stop_loss": "2%",
  "take_profit": "5%"
}
If you set a Secret token on the webhook, use the JSON form and add "secret": "your-token", otherwise the alert is rejected. The same alert twice within 5 seconds is skipped as a duplicate. Results show under Alert log.

Quick Copy Formats · Full Formats