TradingView trading bots: how alerts become orders, and where they break
BotIndex editorial team · Updated 11 Nov 2026 · Editorial policy
TradingView does not trade for you. A TradingView trading bot is a chain: a Pine Script or chart alert fires, TradingView sends a webhook to a bot platform, and the platform places the order on your exchange or broker through its API. 3Commas, WunderTrading, OKX, Bitget, Gate and TradersPost all accept such signals.
How a TradingView trading bot works
A TradingView trading bot is not one product. It is a chain of four parts, and each one can fail on its own:
- Alert. A condition on your chart fires: a price level, an indicator cross, or a Pine Script strategy’s order.
- Webhook. TradingView sends an HTTP POST request with your alert message to a URL you entered. Its alerts introduction describes webhooks as a way “to trigger external bots or scripts”.
- Bot. A signal-bot platform receives the message, checks it, and decides what order to place.
- Exchange or broker. The platform places the order through an API key you connected, or directly if the bot runs on the exchange itself.
That is the whole idea behind “TradingView auto trading” and “TradingView alerts to exchange”. TradingView supplies the chart and the trigger. Someone else does the trading.
What TradingView does and does not do
TradingView’s help pages are clear on the webhook side. From its webhook setup page:
- Webhook alerts are only allowed once two-factor authentication is turned on for your account.
- If your alert message is valid JSON, the request is sent as
application/json; otherwise as plain text. - Only ports 80 and 443 are accepted, and if the receiving server takes longer than three seconds to process a request, the request is cancelled.
- Webhooks “may occasionally fail” to reach the URL. You can check delivery in the Webhook status column of the alert log. The page does not mention automatic retries.
On plans: when TradingView launched webhooks in 2019 it said the feature was “available to paid users only”. Its pricing page lists webhook notifications as a plan feature, so check the current table before you build. The same page caps the free Basic plan at 3 active price alerts. Standard alerts expire after at most two months, and only Premium and Ultimate can set open-ended ones, per the alerts introduction. An expired alert means a bot that silently stops trading.
What TradingView does not do: it does not hold your exchange keys in this setup, size your position, check your balance, or confirm that an order filled. Those jobs belong to the bot platform, and the quality of that handling is what you are really choosing.
Which platforms accept TradingView signals
These are the platforms in our data with a signal or TradingView bot. Facts come from each review; follow the links for fees and country details.
| Platform | Signal bot in our data | Markets | Cost in our data | Watch out for |
|---|---|---|---|---|
| 3Commas | Signal bot for TradingView/Pine Script or webhook signals | Spot | From $15/mo billed annually | Confirmed an API key leak in December 2022; V2 needs a new account |
| WunderTrading | Signal bot built around TradingView alerts | Futures and spot | Free plan with one signal bot; paid from $19/mo | Exchange list and terms not verified by us |
| OKX | Signal bot for your own external signals | Futures | Free bots | Fewer bots in the EU, UK, US and Singapore; restricted in Canada |
| Bitget | Futures signal bot (TradingView) | Futures | Free self-configured grid bots; signal bot fee not confirmed | Terms prohibit Germany, the US, Canada and Singapore |
| Gate | Signal bot for external or provider signals | Futures | Free for bots you set up | Global terms exclude the US, UK, Canada, Singapore, Germany, France and the Netherlands |
| TradeSanta | DCA, grid and futures bots with TradingView signals | Spot and futures | From $18/mo billed annually | Only 4 exchanges listed |
| TradersPost | Turns TradingView, TrendSpider or other alerts into orders at 17 brokers and exchanges | Stocks, options, futures, crypto | Free paper trading; live $49–$299/mo | US-focused terms; not a registered adviser or broker-dealer |
Two more are worth knowing. Coinrule and Pionex both list “Signal” among their strategy types, but our data does not detail a TradingView webhook flow for either, so check their help centers first. TrendSpider is not a TradingView receiver at all: it is a separate charting app whose own bots send orders to your broker through SignalStack, with 5 automated trades a month included.
Exchange-native signal bots (OKX, Bitget, Gate) skip the third-party layer, so no outside platform holds your API key. Third-party platforms let one signal reach several exchanges or brokers. For a ranked shortlist, see best signal trading bots.
Webhook security: secret tokens, not API keys
TradingView’s credentials page says not to include login credentials or passwords in the webhook URL or message, and to “always use secure, authenticated endpoints”. In practice:
- Never put exchange API keys in an alert message. The key goes into the bot platform once. Our API key safety guide covers the trade-only, no-withdrawal, IP-bound setup.
- Use the platform’s secret token. OKX, for example, generates a
signalTokenwhen you create a signal and you paste it into the alert message. Its message specification calls the token “a security measure to ensure that the incoming requests are legitimate and authorized”. - Treat the webhook URL plus token as a trading credential. Anyone who has both can send orders to your bot. Do not paste them into public scripts, screenshots or chats. If they leak, delete the signal and create a new one.
- Limit what a bad signal can do. Fixed position size, a maximum number of open trades and no or low leverage cap the damage from a forged or repeated alert.
The CFTC’s advisory on trading bots also names trade-signal services among the products fraudsters promote with promises of high or guaranteed returns. A paid TradingView “bot signal” deserves the same scepticism.
Common failure points
Repainting indicators
TradingView’s repainting docs explain that a realtime bar has no fixed high, low or close until it finishes, so a crossover can appear and vanish within the bar. Historical bars are always confirmed, which is why a repainting script can look excellent on past data. Its alerts docs say the simplest fix is to make alerts trigger only on the close of the realtime bar. You get the signal later, but it will not disappear.
Delays
There are three clocks: TradingView firing the alert, the webhook reaching the platform, and the order reaching the exchange. TradingView cancels a request after three seconds. OKX lets you set maxLag, the maximum delay in seconds before a signal is treated as void, from 1 to 3,600, with a default of 60. A void signal is better than an entry at a price that has already moved.
Duplicate alerts
- Frequency setting. In Pine Script,
alert.freq_allfires on every call during a realtime bar; once-per-bar fires on the first call, which can be before the bar closes. - Old alerts. TradingView saves a copy of the script, inputs, symbol and timeframe when you create an alert. Editing the script does not change running alerts, so you must delete the old one or you will have two.
- Shared signals. OKX’s signal bot FAQ says all bots linked to one signal will act on it.
Mismatched state
The bot only knows what alerts tell it. If you close a position by hand, or an exit alert fails, the next “exit” or “enter” can hit a position the strategy does not expect. On futures this can mean an unintended position heading toward liquidation. Check the platform’s event log after every manual change.
TradingView webhook bot setup checklist
- Test the strategy first. Use bar-close signals and include fees. Our guide on how to backtest a trading bot covers the traps.
- Check your TradingView plan includes webhook notifications, and turn on two-factor authentication.
- Pick a platform available where you live. Use the table above and the country notes in each review.
- Create a trade-only API key with withdrawals off, ideally on a sub-account with only the bot’s funds.
- Create the signal on the platform and copy its webhook URL and message template, including the secret token.
- Create the alert: set the condition to your script, choose once per bar close, paste the message, tick Webhook URL and paste the URL. Delete any older alerts for the same script.
- Start on paper or demo. OKX uses a separate webhook URL for demo trading; TradersPost offers free paper trading.
- Send a test signal and confirm it in both TradingView’s alert log and the platform’s event history.
- Set limits: fixed size, max open trades, a stop-loss, and a stale-signal limit where the platform offers one.
- Go live small and check the alert expiry date so the bot does not stop without warning.
If you want to automate without writing Pine Script, see how to build a trading bot for no-code options.
FAQ
Can TradingView place trades automatically?
Not on its own through alerts. TradingView alerts can send a webhook, an HTTP POST request to a URL you choose, and TradingView describes this as a way to trigger external bots or scripts. The order itself is placed by the bot platform that receives the webhook.
Do I need a paid TradingView plan for webhook alerts?
When TradingView launched webhooks in 2019 it said the feature was for paid users only, and its pricing page lists webhook notifications as a plan feature. Check the current table for your plan. TradingView also requires two-factor authentication before webhook alerts are allowed.
Can I put my exchange API key in a TradingView alert message?
No. TradingView's own help page says not to include login credentials or passwords in the webhook URL or message. Your API key belongs only in the bot platform; the alert should carry a signal plus the platform's own secret token.
Why did my TradingView bot open the same trade twice?
Common causes are an alert set to fire on every call within a bar, an old alert still running after you created a new one, or several bots listening to the same signal. OKX's FAQ notes that all bots linked to a shared signal will act on it.
Is a Pine Script bot profitable?
Nothing about the TradingView route makes a strategy profitable. It only automates a signal you already have. Test the strategy first, since a script that repaints can look far better on the chart than it performs live.
Sources
- TradingView — How to configure webhook alerts ↗checked 11 Nov 2026
- TradingView — Using credentials for webhooks ↗checked 11 Nov 2026
- TradingView — Introduction to TradingView alerts ↗checked 11 Nov 2026
- TradingView — Subscriptions: pricing and features ↗checked 11 Nov 2026
- TradingView Blog — Alerts can now be sent to 1000's of apps (webhooks launch, 2019) ↗checked 11 Nov 2026
- TradingView — Pine Script docs: Alerts ↗checked 11 Nov 2026
- TradingView — Pine Script docs: Repainting ↗checked 11 Nov 2026
- OKX — Trading Signal Bot Alert Message 2.0 Specifications ↗checked 11 Nov 2026
- OKX — Trading Signal Bot FAQs ↗checked 11 Nov 2026
- CFTC — Customer advisory: AI won't turn trading bots into money machines ↗checked 11 Nov 2026
Not financial advice. Trading bots do not remove market risk.