TradingView Webhook Alerts: The Complete Setup Guide
Everything about TradingView webhook alerts: plan requirements, alert dialog settings, JSON message format, placeholders, testing, and the mistakes that break most setups.
July 15, 2026 · 8 min read · TradeHookX Team
What a webhook alert actually is
A normal TradingView alert notifies you - a popup, an email, a push notification. A webhook alert notifies a machine: when the alert condition triggers, TradingView sends an HTTP POST request to a URL you choose, with your alert message in the body. Whatever listens at that URL can act on it instantly. For traders, that listener is a bridge that turns the message into a live trade.
This is the foundation of almost all TradingView automation. Master the webhook, and any strategy you can express as an alert becomes a strategy you can automate.
Plan and account requirements
Webhook notifications are a paid TradingView feature. The free Basic plan supports a handful of price alerts by email only - no webhooks and no indicator or strategy alerts. Webhooks unlock at the Essential tier and up, and TradingView requires two-factor authentication enabled on your account before webhook delivery works. A TradingView paid-plan trial includes webhooks too, so you can test the full pipeline before paying anyone anything.
The alert dialog, field by field
- •Condition: your indicator, strategy, or price level - whatever should trigger the trade
- •Trigger: Once Per Bar Close is the standard for strategies; it avoids repainting and intrabar noise
- •Expiration: paid-plan alerts expire - extend or set open-ended so a live strategy does not silently die
- •Notifications tab, Webhook URL: paste your bridge URL here
- •Message: the JSON instruction - this is what the bridge parses
The message format
Your message must be valid JSON - TradingView only sends the application/json content type when the message parses cleanly. At minimum you need a license key, an action, and a symbol. Everything else - stop loss, take profit, sizing, breakeven, trailing - is optional fields on top:
{
"licenseKey": "TB-XXXX-XXXX-XXXX",
"action": "{{strategy.order.action}}",
"symbol": "{{ticker}}",
"size": "{{strategy.order.contracts}}", "size_type": "units"
}Placeholders: one alert, every direction
The double-brace values are TradingView placeholders, replaced at fire time with live values. Using the strategy order action as your action field means a single alert covers buys, sells, and exits - your Pine strategy decides, the webhook carries the decision. The ticker placeholder makes the same alert work on any chart, and the contracts placeholder passes your strategy position sizing straight through.
If writing this JSON by hand feels error-prone, it is - one missing quote and TradingView sends plain text that bridges reject. A visual Alert Builder that generates the JSON removes that entire class of failure.
Testing before going live
Never let a live strategy be your first test. Fire the alert manually on a demo account, or better, use a webhook tester that sends the identical JSON through the identical pipeline. Confirm three things: the signal arrives (feed shows it), it parses (no format error), and it executes (position opens with the right size, SL, and TP). Only then attach real money.
The failures that account for most broken setups: free TradingView plan, 2FA not enabled, invalid JSON in the message, an expired alert, and webhook URLs with a typo. All five are checkable in under two minutes.
Ready to automate your strategy?
7-day free trial on every plan. No credit card required.
Start free trial