Bridge the gap between analysis and execution by automating TradingView indicator alerts. Configure webhooks and JSON payloads for seamless futures trading.

TradingView indicator-based alerts allow traders to automate futures execution by triggering webhook notifications when custom conditions are met in Pine Script or built-in indicators. Setting up these alerts requires configuring alert conditions, adding webhook URLs with JSON payloads, and connecting to a broker-compatible automation platform that executes trades in real-time based on your predefined rules.
Indicator-based alerts in TradingView are automated notifications triggered when specific technical analysis conditions are met on your chart. These alerts monitor indicators like moving averages, RSI, MACD, or custom Pine Script logic, sending webhook messages to external platforms when conditions evaluate to true. For futures traders, these alerts form the bridge between chart analysis and actual order execution.
Alert Condition: A boolean expression in Pine Script or built-in indicator settings that evaluates price, volume, or technical data and triggers a notification when true. Alert conditions form the decision logic for automated trade entries and exits.
TradingView supports two alert types relevant to automation. Indicator alerts fire based on technical conditions like crossovers or threshold breaks. Strategy alerts trigger from backtested Pine Script strategies that include entry and exit logic. Both can send webhook data to platforms that execute futures orders automatically.
The alert system runs on TradingView's servers, monitoring your conditions 24/7 even when your browser is closed. Once configured, alerts check every bar close or tick depending on your timeframe settings. When conditions match, TradingView sends HTTP POST requests to your specified webhook URL with customizable message data.
When an indicator alert fires, TradingView sends an HTTP webhook containing your predefined JSON payload to an automation platform's API endpoint. The automation platform parses the JSON data, extracts trade parameters like symbol, direction, and quantity, then routes the order to your connected futures broker via their API. Execution typically completes in 3-40 milliseconds depending on broker connection quality.
The workflow follows this sequence: Your indicator evaluates bar data and determines conditions are met. TradingView's alert server generates a webhook POST request containing your message template. The automation platform receives the webhook, validates the format, applies risk controls, and submits the order to your broker's order management system. The broker executes the trade and returns confirmation.
Webhook: An automated HTTP POST request sent from TradingView to an external URL when an alert fires, containing custom message data that specifies trade parameters. Webhooks enable real-time communication between chart alerts and execution platforms without manual intervention.
Platforms like ClearEdge Trading process these webhooks and handle broker integration, converting alert messages into properly formatted futures orders. The system accounts for contract specifications, including ES tick sizes of 0.25 points ($12.50 per tick) or NQ ticks at 0.25 points ($5.00 per tick), ensuring order parameters match exchange requirements.
Alert frequency settings determine how often conditions can trigger. "Once Per Bar Close" fires only when a bar completes with conditions true, reducing false signals from intrabar price fluctuations. "Once Per Bar" allows one trigger per bar even if conditions oscillate. "Only Once" fires a single time until manually reset, useful for one-time entry signals.
Setting up indicator-based alerts for automation requires precise configuration to ensure reliable signal transmission. The process begins with indicator selection and ends with webhook validation testing.
Apply the indicator generating your trade signals—built-in tools like RSI or MACD, or custom Pine Script indicators. Verify the indicator displays correctly on your futures contract chart (ES, NQ, GC, or CL). Confirm the timeframe matches your strategy requirements, as alert conditions evaluate at bar close for that timeframe.
Click the alert icon in TradingView's top toolbar or right-click the indicator and select "Add Alert." In the Condition dropdown, select your indicator and the specific condition (crossover, greater than, less than, etc.). For custom Pine Script indicators, your code must include alertcondition() or alert() functions to expose conditions in the alert dialog.
Set the alert to trigger "Once Per Bar Close" for most strategies to avoid false signals from intrabar volatility. Choose an expiration—"Open-ended" keeps the alert active indefinitely, while specific dates work for time-limited strategies. Name the alert descriptively (e.g., "ES_5min_MACD_Long") to identify it easily when managing multiple alerts.
Check "Webhook URL" and paste the endpoint provided by your automation platform. In the Message field, enter your JSON payload with trade parameters. This message tells the automation platform what action to take when the alert fires. Test the format carefully—malformed JSON will cause execution failures.
Webhook configuration determines what data your automation platform receives and how it interprets trade instructions. The webhook URL acts as the destination endpoint, while the JSON payload contains the actual order parameters.
Your automation platform provides a unique webhook URL formatted like https://platform.com/webhook/your-api-key. This URL includes authentication credentials, so treat it like a password. Copy the exact URL into TradingView's Webhook URL field—any typos will cause alerts to fail silently without error messages visible in TradingView.
JSON Payload: Structured data format containing key-value pairs that specify trade parameters like symbol, direction, quantity, and order type. Automation platforms parse JSON payloads to determine how to execute the trade at your broker.
A basic JSON payload for ES futures looks like this:
{"symbol": "ES", "action": "buy", "quantity": 1, "orderType": "market"}
More advanced payloads include stop losses and take profits:
{"symbol": "NQ", "action": "sell", "quantity": 2, "orderType": "market", "stopLoss": 10, "takeProfit": 20}
The symbol field must match your broker's contract notation. Most platforms accept standard symbols like ES, NQ, GC, CL, but some brokers require month codes like ESZ4 for December 2024 E-mini S&P contracts. Check your platform's supported brokers documentation for exact formatting requirements.
JSON FieldPurposeExample ValuessymbolFutures contract to tradeES, NQ, GC, CL, MES, MNQactionTrade directionbuy, sell, close, reversequantityNumber of contracts1, 2, 5 (integer values)orderTypeExecution methodmarket, limit, stopstopLossRisk management exit10 (points from entry)takeProfitProfit target exit20 (points from entry)
TradingView allows dynamic variables in alert messages using the {{ticker}}, {{close}}, and {{time}} placeholders. These inject real-time data into your JSON payload. For example, {"symbol": "{{ticker}}", "action": "buy", "price": {{close}}} automatically inserts the current chart symbol and closing price when the alert fires.
Test webhook delivery using tools like webhook.site before connecting to live trading accounts. Send a test alert and verify the JSON structure appears correctly at the test URL. This validates your payload format without risking actual trade execution. Only after successful test delivery should you switch to your automation platform's production webhook URL.
Setting alerts to trigger on every function call rather than "Once Per Bar Close" generates dozens of duplicate signals from intrabar price movement. A 5-minute ES chart might fire 50 alerts in one bar if conditions oscillate. This floods your automation platform with redundant orders, potentially opening far more contracts than intended. Always use "Once Per Bar Close" unless you specifically need tick-level execution.
Missing quotes, brackets, or commas in JSON payloads cause silent failures—TradingView sends the webhook, but your automation platform can't parse it. Common errors include forgetting quotes around string values ({symbol: ES} instead of {"symbol": "ES"}) or adding trailing commas. Validate JSON syntax using a checker before deploying alerts.
If you copy an alert from ES to an NQ chart but the JSON still says "symbol": "ES", the NQ alert will execute ES trades. Use the {{ticker}} variable to dynamically insert the chart symbol: {"symbol": "{{ticker}}", "action": "buy"}. This makes alerts portable across different contract charts.
Alerts expire silently without notification. If you set a 30-day expiration in January and forget to renew, your automation stops firing trades in February with no warning. Use "Open-ended" for production alerts, or set calendar reminders to review and renew expiring alerts before they lapse.
Deploying alerts directly to live accounts without paper trading often reveals logic errors only after real losses occur. An indicator that looked perfect on historical data might fire false signals in real-time due to repainting or lookahead bias. Run alerts on paper trading accounts for at least 5-10 trading days to validate behavior before committing capital.
TradingView's free plan limits you to 1 active alert at a time, which is insufficient for automated trading that typically requires separate alerts for entries, exits, and multiple symbols. The Pro plan ($14.95/month) allows 20 alerts, Pro+ allows 100, and Premium allows 400 alerts. For futures automation across multiple timeframes and instruments, Pro or higher is practically necessary.
Yes, alerts evaluate conditions on any timeframe from 1-second to monthly charts. However, shorter timeframes generate more alerts and require faster execution infrastructure. A 1-minute ES chart might fire 50 alerts daily, while a 1-hour chart fires 3-5. Consider your automation platform's execution speed—latency matters more on shorter timeframes where slippage accumulates quickly.
TradingView doesn't have built-in economic calendar filtering, so you must code time-based conditions in Pine Script or manage alert activation manually. Use time and hour functions to disable signals during FOMC announcements (2:00 PM ET) or NFP releases (8:30 AM ET first Friday). Alternatively, pause your automation platform during scheduled high-volatility events to prevent execution during widened spreads.
Alerts don't fire if TradingView experiences outages, creating gaps in your automation. Check TradingView's status page regularly and consider redundant setups using direct broker APIs for critical strategies. Some traders run duplicate alerts across multiple platforms, though this requires careful coordination to prevent double-execution.
TradingView's Strategy Tester lets you backtest Pine Script strategies that include alert logic, showing historical performance. However, strategy results differ from live alert behavior due to repainting indicators and execution assumptions. Backtest to validate logic, then paper trade to confirm real-time performance matches expectations before deploying capital.
Configuring TradingView indicator-based alerts for automated futures trading requires precise setup of alert conditions, webhook URLs, and JSON payloads that accurately communicate trade parameters to execution platforms. Proper configuration includes selecting appropriate alert frequencies, validating JSON syntax, and testing thoroughly with paper trading before live deployment.
Start by setting up alerts on a single contract like MES (Micro E-mini S&P) with small position sizes to validate your workflow. Once you've confirmed alerts fire correctly and trades execute as intended, scale to larger contracts and multiple instruments using the framework established during initial testing.
Ready to automate your TradingView alerts? View ClearEdge Trading Plans →
Disclaimer: This article is for educational and informational purposes only. It does not constitute trading advice, investment advice, or any recommendation to buy or sell futures contracts. ClearEdge Trading is a software platform that executes trades based on your predefined rules—it does not provide trading signals, strategies, or personalized recommendations.
Risk Warning: Futures trading involves substantial risk of loss and is not suitable for all investors. You could lose more than your initial investment. Past performance of any trading system, methodology, or strategy is not indicative of future results. Before trading futures, you should carefully consider your financial situation and risk tolerance. Only trade with capital you can afford to lose.
CFTC RULE 4.41: Hypothetical or simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity.
By: ClearEdge Trading Team | 29+ Years CME Floor Trading Experience | About
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Block quote
Ordered list
Unordered list
Bold text
Emphasis
Superscript
Subscript
Every week, we break down real strategies from traders with 100+ years of combined experience, so you can skip the line and trade without emotion.
