What Is a TradingView Webhook?
A TradingView webhook is an HTTP POST request that TradingView sends to a URL of your choice every time an alert fires. The body of that request is whatever you typed into the alert's Message field.
That is all a webhook is: TradingView does not know or care what happens next. The service behind the URL decides what the message means. For trading automation, that service reads the message, works out the symbol, side and size, and places an order with your broker.
This guide covers the parts that trip people up: which TradingView plans can send webhooks, the limits TradingView enforces, how to write a message that is valid JSON, and how to troubleshoot an alert that fired without placing an order. The examples use Roboquant Connect, which turns TradingView alerts into orders on Tradovate futures accounts.
What You Need Before You Start
1. A TradingView plan that includes webhooks
Webhook notifications are not available on the free Basic plan. According to TradingView's pricing page (checked September 2026), they are included on Essential and every plan above it. The plans also differ in how many active technical alerts you can run at once:
| TradingView plan | Webhook notifications | Active technical alerts |
|---|---|---|
| Basic | No | 0 |
| Essential | Yes | 20 |
| Plus | Yes | 100 |
| Premium | Yes | 400 |
| Ultimate | Yes | 1,000 |
Plans and limits change, so confirm on TradingView's pricing page before you subscribe.
2. Two-factor authentication on your TradingView account
TradingView's webhook documentation states that webhook alerts are only allowed when two-factor authentication is enabled. If the Webhook URL checkbox is greyed out or your alerts never arrive, check this first.
3. A URL that can receive the alert
This is the service that acts on your message. With Roboquant Connect you get a personal webhook URL in the Alert Builder. Treat it like a password: anyone with the URL can send orders to your connected accounts.
TradingView's Technical Limits
These come from TradingView's own documentation and apply no matter which service receives the alert:
- Ports: only 80 (HTTP) and 443 (HTTPS). A URL with any other port will not work.
- Timeout: the receiving server has 3 seconds to respond.
- No IPv6: the receiving server must be reachable over IPv4.
- Message field: up to 4,000 characters (size limits).
- Pine
alert()messages andalert_message: up to 40,960 characters. - Alert name: up to 300 characters.
A normal order message is a few hundred characters, so the size limits only matter if you build very large messages in Pine Script.
Strategy Alerts vs Indicator Alerts
TradingView can fire alerts from two kinds of scripts, and the message you write depends on which one you use.
Strategy alerts fire when a Pine Script strategy fills an order in TradingView's simulation. They can use strategy placeholders such as {{strategy.order.action}} and {{strategy.order.contracts}}, so one alert covers entries, exits and reversals. The message tells your broker exactly what the strategy just did.
Indicator alerts fire on a condition: a price crossing a level, an indicator crossing another, or an alertcondition() in an indicator script. There is no order to describe, so you fix the side and quantity in the message yourself. You usually need one alert per action: one for buy, one for sell, one for close.
If your idea already exists as a strategy, strategy alerts are simpler to maintain: change the strategy, and the alerts follow.
TradingView Placeholders
TradingView replaces placeholders in double curly braces with live values when the alert fires. The full list is in TradingView's variable documentation. The ones used most for automation:
| Placeholder | What it contains |
|---|---|
{{ticker}} | The symbol of the chart the alert runs on |
{{exchange}} | The exchange of that symbol |
{{close}} | The bar's close price |
{{time}} | The bar time |
{{interval}} | The chart timeframe |
{{strategy.order.action}} | The side of the strategy order (buy or sell) |
{{strategy.order.contracts}} | The size of the strategy order |
{{strategy.order.price}} | The price the strategy order filled at |
{{strategy.order.id}} | The order ID from your Pine code |
{{strategy.order.alert_message}} | The alert_message argument set on the order in Pine |
{{strategy.market_position}} | The strategy's position after the order |
{{strategy.position_size}} | The strategy's position size after the order |
Strategy placeholders only have values in strategy alerts. In an indicator alert they stay empty.
Writing a Valid JSON Message
Most automation services expect the message to be JSON. TradingView sends the text exactly as you typed it, after swapping in placeholder values, so a typo becomes a rejected order.
This is the message Roboquant Connect's Alert Builder generates for a strategy alert on one Tradovate account:
{
"exchange": "tradovate",
"accountId": 12345678,
"symbol": "{{ticker}}",
"side": "{{strategy.order.action}}",
"quantity": "{{strategy.order.contracts}}",
"price": "{{strategy.order.price}}"
}
A few rules keep a message valid:
- Use double quotes around keys and text values. Single quotes are not valid JSON.
- Quote your placeholders.
"quantity": "{{strategy.order.contracts}}"is valid JSON before and after TradingView fills it in. Connect accepts numbers sent as text. - No trailing comma after the last field.
- Put the JSON in the Message field only. The webhook URL goes in the Notifications tab, not in the message.
You rarely need to write this by hand. Build the alert in Connect's Alert Builder and copy the generated JSON. For every field Connect accepts, including stop loss, take profit, limit orders and multiple accounts, see the TradingView alert JSON format reference.
From Alert to Tradovate Order: Setup With Roboquant Connect
Here is the full path, following the Roboquant Connect setup guide. The detailed walkthrough is in How to Connect TradingView to Tradovate.
Step 1: Connect your Tradovate account
In the Connect app, go to Accounts → Connect Tradovate. You log in on Tradovate's own page (OAuth), so Connect never sees your Tradovate password. Every account under that login is connected at once, including prop-firm evaluation and funded accounts. Start with a demo account.
Step 2: Build the alert in the Alert Builder
Pick the account or accounts to trade, the position sizing, the order type and an optional take profit and stop loss. Leave the symbol empty to use {{ticker}}, so the alert trades whatever chart it fires from. Then copy two things: your webhook URL and the generated alert message (JSON).
Step 3: Create the alert in TradingView
- Right-click your chart and select Add Alert.
- In Condition, pick your strategy or indicator.
- In the Notifications tab, check Webhook URL and paste your webhook URL.
- In Message, paste the JSON from the Alert Builder.
- Where TradingView offers it, set the trigger to Once Per Bar Close to avoid acting on signals that repaint.
- Click Create.
Step 4: Verify it works
Fire a test signal or wait for the next one. Every order appears in Executions with its status, the broker order ID and the exact payload that triggered it. Active Alerts shows which alerts are armed, and Positions tracks P&L across your accounts.
Step 5: Set your safety rails
Before trading live, review Connect's risk controls:
- Kill switch: blocks every order, globally or per account. It does not close positions you already hold.
- Allowed symbols: an alert can only trade the instruments you list. Contract months are ignored when matching, so
ESH5matchesES. On continuous-contract charts{{ticker}}sends symbols such asMNQ1!, which does not matchMNQ, so list each symbol exactly as your alert sends it, or send a fixed root symbol instead of{{ticker}}. - Max daily trades per account: defaults to 50 and resets at 00:00 UTC. Blocked orders do not count.
- Max daily loss per account: based on realized P&L only. Once reached, orders that open or add to a position are blocked, while exits and
closestill go through. It resets at 00:00 UTC.
One more setting is easy to misread: Max position value. In Fixed Qty mode it scales the alert's quantity down; orders sent with fixedQuantity are not capped, and in % Risk / $ Risk modes it caps the dollar risk per trade. Don't treat it as an exposure limit. Control exposure with your own contract sizing, the daily trade and loss limits, and the kill switch.
Connect's stated target is under 50 ms from receiving an alert to placing the order. TradingView's own delivery time comes on top of that and is outside any receiver's control.
Troubleshooting
The alert fired, but no order was placed
- Check that the JSON names an account. Connect's messages must include
accountId(oraccountIds/accountsfor several accounts). - Check that the webhook URL is in the Notifications tab, not pasted into the message.
- Check that the message is still valid JSON if you edited it by hand.
The webhook never arrives
- Two-factor authentication is not enabled on TradingView.
- Your TradingView plan does not include webhooks (Basic).
- The URL was copied incompletely, or you added a port other than 80 or 443.
The order shows "failed" in Executions
Open the entry to read the reason. The most common causes:
- The Tradovate session needs a reconnect. Go to Accounts → Reconnect.
- The contract month has expired. Use the root symbol (such as
MNQ) or{{ticker}}so the alert trades the current front month. - A safety rail blocked it. The kill switch is on, the symbol is not in Allowed Symbols (on continuous charts the alert sends
MNQ1!, notMNQ), or the account hit its daily trade or daily loss limit.
Best Practices
- Test on a Tradovate demo account first. Watch a full cycle of entries and exits in Executions before you go live.
- Start with one contract. Scale only after the automation has behaved as expected for a while.
- Prefer strategy alerts when your logic is a strategy, so entries and exits come from one source.
- Keep the kill switch within reach. Remember it stops new orders; close open positions in Tradovate yourself.
- Set Allowed Symbols so a mistyped alert on the wrong chart cannot trade an instrument you did not approve. List symbols exactly as your alerts send them (for example
MNQ1!from a continuous chart via{{ticker}}). - Review Executions regularly, not only when something looks wrong.
Related Guides
- How to Connect TradingView to Tradovate: Step-by-Step Guide
- TradingView Alert JSON Format: Complete Reference Guide
- Multi-Account Futures Trading With One Alert
- TradingView to Tradovate automation with Roboquant Connect
Automate Your TradingView Alerts
Roboquant Connect routes TradingView alerts to your Tradovate accounts, with unlimited Tradovate accounts and the safety rails above. It costs $39.90/month and every new subscription starts with a 7-day free trial.
Start your free trial or read the setup guide.
Automated trading involves risk of loss.