Skip to main content

TradingView Webhook Setup

Automate trade execution directly from TradingView strategies and alerts using PipSync's webhook endpoint.

Before you begin

  • A PipSync account with at least Freemium plan
  • A TradingView account (Pro, Pro+, or Premium to use webhooks)
  • A connected broker in PipSync

TradingView webhooks require a paid TradingView plan. The free plan does not support webhook alerts.

Part 1 — Get your PipSync webhook URL

1

Open Sources in PipSync

In your dashboard, navigate to Sources → Add Source → TradingView Webhook.

2

Copy your webhook URL

PipSync generates a unique webhook URL for your account. It looks like:

https://pipsync.io/api/tradingview/webhook/YOUR_SECRET_TOKEN

Copy this URL — you'll paste it into TradingView's alert settings.

Keep your webhook URL private. Anyone with access to it can send signals to your account. If compromised, regenerate it from the Sources page.

Part 2 — Create a TradingView alert

1

Open the Alerts panel in TradingView

In TradingView, click the Alerts icon in the right toolbar (clock icon) or press Alt+A.

2

Configure your alert conditions

Set the alert condition — e.g., when your strategy fires a buy or sell signal, or when a price level is crossed.

3

Set the alert message (JSON format)

In the Message field, paste the JSON payload PipSync expects. Use this template:

{
  "action": "{{strategy.order.action}}",
  "symbol": "{{ticker}}",
  "price": {{close}},
  "sl": 0,
  "tp": 0,
  "lots": 0.01
}

Replace sl, tp, and lots with fixed values or TradingView strategy variables.

4

Add the webhook URL

Scroll down to Notifications → Webhook URL and paste your PipSync webhook URL.

5

Save the alert

Click Create. The alert is now active. When triggered, TradingView POSTs the JSON to PipSync, which parses it and routes the trade to your broker.

Webhook payload reference

Full payload schema with all supported fields:

{
  "action": "buy" | "sell" | "close",
  "symbol": "EURUSD",          // MT5 instrument name
  "price": 1.0850,             // entry price (0 = market)
  "sl": 1.0800,                // stop-loss price (0 = none)
  "tp": 1.0950,                // take-profit price (0 = none)
  "lots": 0.01,                // position size (overrides risk rules)
  "comment": "TV signal"       // optional trade comment
}
actionrequired

Trade direction. "close" closes the open position on that symbol.

symbolrequired

MT5 instrument name exactly as it appears in your broker's symbol list (e.g., XAUUSD, US30, EURUSD).

priceoptional

Entry price. Set to 0 to use current market price.

sl / tpoptional

Stop-loss and take-profit levels. Set to 0 to omit.

lotsoptional

Overrides your risk management lot size for this specific trade. Omit to use your configured risk rules.

Testing your webhook

You can test your webhook without waiting for an alert to fire. In PipSync, go to Sources → [Your TV Source] → Send Test Signal. This sends a sample payload and shows you the parsed result and whether the broker accepted it.

Always test with a demo account first. Enable Manual Approval mode to inspect the trade before it executes.