TradingView alerts can connect a chart condition to a webhook trading bot, broker bridge, or automation platform, but reliable execution depends on more than switching on a notification. This guide provides a reusable checklist for designing alert conditions, writing clear webhook payloads, testing delivery, controlling duplicate signals, and reviewing the workflow when your strategy or tools change.
Overview
A TradingView alert is a notification triggered by a condition on a symbol, indicator, drawing, or Pine Script strategy. A webhook adds another step: TradingView sends an HTTP request to a URL managed by your automation service. That service then interprets the message and may submit an order, update a position, or record the event.
The complete workflow usually has five separate components:
- Signal logic: The TradingView indicator or strategy determines when a condition is true.
- Alert configuration: You choose the trigger, frequency, expiration, and message.
- Webhook receiver: An automation platform, server, or trading bot accepts the request.
- Execution layer: The receiver validates the signal and communicates with a broker or exchange.
- Monitoring and records: Logs show whether the alert arrived, was accepted, and produced the intended action.
These layers should be tested independently. A correct chart signal does not guarantee that a webhook was delivered, and a successfully delivered webhook does not guarantee that an order was accepted. Treat the alert as an instruction that still requires validation, risk controls, and operational monitoring.
Before automating a live account, run the workflow in paper trading, a sandbox, or another environment where an error cannot create an unintended position. TradingView’s paper trading guide can help clarify what simulated execution does and does not test.
Checklist by scenario
For an indicator alert
- Define the exact event: crossover, threshold break, candle close, or another condition.
- Confirm which symbol, exchange, and timeframe are used on the chart.
- Decide whether the signal should trigger intrabar or only after the bar closes.
- Set an appropriate alert frequency, such as once per bar close, when repeated intrabar signals are not wanted.
- Use a message that identifies the symbol, timeframe, direction, and event.
- Check whether the indicator can remain true for several bars. If so, design the receiver to reject repeated instructions where appropriate.
For a Pine Script strategy alert
- Confirm whether the alert is based on order fills, alert conditions, or both.
- Review the strategy’s entry, exit, and position-sizing rules before connecting execution.
- Specify the intended action explicitly: enter long, enter short, close long, close short, or cancel an order.
- Include a unique signal identifier or timestamp so the receiving system can recognize duplicates.
- Test historical signals separately from real-time signals; backtest behavior does not prove that live alerts will arrive or fill as expected.
- Document assumptions about commission, slippage, session times, and order type.
For a webhook trading bot
- Use the exact webhook URL supplied by the receiving service, without adding spaces or unsupported parameters.
- Keep credentials, API keys, and private tokens out of public scripts, screenshots, and shared chart templates.
- Send structured data rather than an ambiguous sentence whenever the receiver supports JSON.
- Include a shared secret or other authentication method required by the receiver.
- Validate the symbol mapping. A chart symbol and a broker or exchange symbol may use different naming conventions.
- Set maximum position size, permitted direction, and order-type restrictions on the receiving side.
- Record the request, validation result, broker response, and final position state.
For a manual-confirmation workflow
- Send the alert to a channel where it can be reviewed quickly.
- Include the chart timeframe, setup name, entry reference, invalidation level, and intended risk limit.
- Require a human confirmation before sending an order when the signal is discretionary or the market is thin.
- Use a separate alert for exits if the strategy requires an independent risk response.
A compact JSON-style message might look like this:
{
"secret": "REPLACE_WITH_RECEIVER_SECRET",
"source": "tradingview",
"event": "long_entry",
"symbol": "{{ticker}}",
"exchange": "{{exchange}}",
"timeframe": "{{interval}}",
"price": "{{close}}",
"bar_time": "{{time}}",
"signal_id": "strategyA-{{ticker}}-{{time}}"
}
Use only placeholders supported by the relevant TradingView alert context, and confirm how the receiving platform expects numbers, timestamps, and symbols to be formatted. The receiver should reject missing fields instead of guessing what the message means.
What to double-check
Signal timing
Decide whether a condition is valid during a forming candle or only once that candle closes. Intrabar conditions can change before the close, while close-confirmed conditions may arrive later but are easier to reproduce. Your alert setting, Pine Script logic, and backtest assumptions should all use the same timing model.
Position and risk controls
An alert should not be the only risk control. Define a maximum order quantity, maximum total exposure, and a response to an already-open position. Add safeguards for stale signals, invalid prices, disconnected broker accounts, and repeated messages. Position sizing should be based on a documented risk rule rather than a fixed quantity that ignores volatility. For a volatility-based approach, see this ATR position-sizing guide.
Time, symbol, and session details
Check the chart’s exchange, session template, and timezone. A strategy designed for a regular stock-market session may behave differently when extended hours are included. Forex and crypto workflows also require clear decisions about rollover, weekend behavior, and continuous markets. Confirm that the receiver interprets the symbol and timestamp exactly as intended.
Delivery and execution separation
Maintain two logs: one for alert delivery and one for order execution. The first should show when TradingView sent the request and what payload it contained. The second should show whether the receiver authenticated it, passed validation, submitted an order, and received a broker response. This separation makes it easier to identify whether a failure began in the chart, network, automation service, or execution venue.
Security
Use HTTPS and protect webhook endpoints with authentication. Avoid placing exchange credentials in alert messages unless the receiving architecture explicitly requires it and protects them appropriately. Rotate secrets after accidental disclosure, limit API permissions to what the bot needs, and keep withdrawal permissions disabled where applicable. Review access to alert templates and automation dashboards as carefully as access to the trading account.
Common mistakes
- Testing only the chart: A visible alert marker proves little about webhook delivery or order handling. Send a test message through the entire chain.
- Using vague instructions: “Buy signal” does not tell a bot whether to open, add to, or reverse a position. Use explicit event names.
- Ignoring duplicate alerts: Repeated conditions, reconnects, or retries can create more than one request. Use a signal ID and idempotency check.
- Assuming alert price equals fill price: Market movement, liquidity, slippage, and order rejection can create different results. Treat the alert price as reference data.
- Forgetting alert expiration: Review the expiration setting after changing a strategy or creating a seasonal workflow.
- Changing the chart without updating the alert: An alert may retain the condition and inputs that existed when it was created. Recheck active alerts after modifying scripts, symbols, or settings.
- Automating without a kill switch: Keep a documented way to disable alerts and stop new orders quickly.
- Skipping reconciliation: Compare the bot’s expected position with the broker’s actual position. A missed message can leave the two states out of sync.
A TradingView webhook is an automation component, not a substitute for a tested trading strategy. Review the logic with the same discipline used for other TradingView strategies, including out-of-sample testing, realistic costs, and paper execution.
When to revisit
Use this checklist whenever the workflow changes, not only when a trade appears to fail. Revisit it before a new trading season, a change in market session, a migration to another broker or exchange, or an update to the automation platform. It is also worth reviewing after a Pine Script revision, symbol change, new timeframe, API credential rotation, or unexplained duplicate order.
Before enabling a revised workflow, complete this short review:
- Write down the intended signal, timing, symbol, and action.
- Compare the alert condition with the current script and chart inputs.
- Send a non-trading test payload and confirm authentication, parsing, and logging.
- Run a paper or sandbox order through entry, exit, rejection, and duplicate-message cases.
- Confirm position limits, stop procedures, and the manual kill switch.
- Record the alert name, version, date tested, and person responsible for review.
- Enable live automation conservatively and monitor the first signals rather than assuming success.
Keep this record beside your trading journal and update it when tools or workflows change. A dependable TradingView automation setup is less about adding complexity and more about making every handoff—from signal to webhook to execution—clear, testable, and reversible.