Skip to content

Blog

Turn your TradingView alerts into bot trades, without giving up your safety limits

December 5, 2026

If you trade from TradingView, you probably already have a rule that works for you: a line crossing, an indicator turning, a Pine Script strategy that prints "buy" on the chart. What you do not have is someone watching the chart at 3 a.m.

A TradingView alert can close that gap. When your rule fires, TradingView sends a short message to an address you choose, and a bot on the other end places the trade. This article walks through how that works in Bitcator, what to put in the message, and the settings that decide whether the setup is something you can rely on or a source of surprises.

What an alert actually does

An alert does not trade. TradingView only generates it: your condition is met, a text message is posted to a web address, and that is all TradingView does. Everything after that is the bot's job.

In Bitcator the address belongs to one bot. You create a bot with the TradingView entry (it is one of the entry options of a standard bot, available from the Starter plan), generate a secret key on the bot's page, and copy two things into TradingView: the address, into the Webhook URL box of the alert, and a ready-made message, into the Message box. The bot's page gives you the whole setup as three short steps.

The message is a small piece of text with a few fields. The ones you will meet most often:

  • secret and action are required. The secret proves the alert is yours; the action says what you want, for example enter_long, exit, add (an extra DCA order) or close_all.

  • pair names the market, filled in by TradingView with {{ticker}}. It is only needed when the bot trades several pairs.

  • time and id are optional but worth keeping. The first lets the bot drop an alert that arrives too late; the second stops the same alert from being handled twice.

  • amount_usdt lets an alert choose the trade size, but only if you allow it on the bot and only up to a limit you set.

The bot's page generates these messages for you, so you rarely type them by hand. A strategy alert can use TradingView's own {{strategy.order.action}} placeholder: the bot then reads buy and sell relative to its own direction, so a long bot opens on buy and closes on sell.

Why the secret lives inside the message

TradingView cannot add custom headers to a webhook; it posts only the text you wrote, and it gives up after a few seconds. That is why the secret travels inside the message instead of in a header. It also explains a few habits worth adopting:

  • Treat the message like a password. Do not paste it in screenshots or share a Pine Script that contains it. Each bot has its own secret, so a leak affects one bot and nothing else.

  • Rotate it if in doubt. One tap on the bot's page creates a new secret and the old one stops working immediately. Remember to update the message of every alert of that bot afterwards, otherwise those alerts are refused.

  • Consider the TradingView-only mode. In the bot's security settings you can ask Bitcator to refuse any request that does not come from TradingView's published addresses, even if it carries the right secret.

  • Turn on two-step verification in TradingView. TradingView requires it before it will send webhooks at all.

The secret cannot move money out of your account: an alert can only open and close trades on the bot's own pair, in the bot's own direction, on the bot's own exchange account.

A late alert is a different trade

Alerts travel over the internet, and sometimes they are delayed. Why does it matter? Because the price keeps moving while the message waits. The chart below measures it on real BTC/USDT prices: for every minute of the February and August 2026 snapshots, it asks how far the price had moved after a delay of 1 minute, 5 minutes, 15 minutes and an hour.

Bar chart of the absolute BTC/USDT price change after a delay. Median / worst 5%: 1 minute 0.04% / 0.22%, 5 minutes 0.09% / 0.50%, 15 minutes 0.15% / 0.87%, 1 hour 0.29% / 1.75%.

BTC/USDT 1-minute closes, February and August 2026 snapshots (about 18,700 minutes). The value is the absolute price change after the delay.

In a normal minute the move is tiny: a median of 0.04% after 1 minute. But the worst 5% of cases are several times larger, and they are exactly the busy moments when alerts are most likely to fire. After 15 minutes the worst 5% reached 0.87%, which is more than the usual fee on a round trip. A signal that arrives that late describes a market that no longer exists.

This is why a TradingView bot has a maximum signal age setting (60 seconds by default; you can choose anything from 5 seconds to 10 minutes). The age is measured from the time field of your message when it is present, so a delay inside TradingView counts too. An alert older than the limit is refused, and that includes exit alerts. A shorter limit suits fast strategies; a longer one suits strategies on hourly candles where a minute does not change the picture. Either way, a refused signal is better than a trade at a stale price.

What happens after the alert arrives

The alert is a request, and the bot decides whether to grant it. It passes the same gates as any other entry of that bot:

Four steps: TradingView sends the alert; Bitcator checks the secret, the age of the message and duplicates; the bot's protections run; the order goes to the exchange or to paper with the bot's own settings.
  • Checks first. Secret, message age, and the id: an alert you have already sent is ignored, so a retry cannot open the trade twice.

  • Protections next. The risk shield, the limit on simultaneous trades, the cool-down between trades, volume and price-data freshness all apply to a TradingView signal exactly as they do to a price trigger. Our article on risk management for trading bots explains these tools. If a gate says no, the signal is refused and the reason is written in the bot's log, for example "refused because the risk shield is active". Refused signals also send you a notification.

  • Then the order. It is placed with the bot's own settings: the amount, the DCA steps, take profit, stop, trailing and maximum duration all work the way you configured them.

One rule is different on purpose. An exit signal has no gate: like a stop, it closes an open trade at the market price, even at a loss, because you decided to exit. The stop, the time limit and the protections for delistings keep running in the background as well.

Choosing who is in charge of the exit

A TradingView bot lets you split the work between your chart and the bot in two ways:

  • Chart decides the entry, the bot decides the exit. The alert opens the trade; take profit, stop and trailing close it. This is the simplest start, and your alerts only need one message.

  • Chart decides both. With the TradingView exit option the bot has no take profit of its own and closes when your exit alert arrives (the stop and the other protections still stand guard). Be sure your strategy sends exits reliably: an exit alert that is refused for being late leaves the trade open.

For DCA you can also choose where the extra orders come from: from price drops, as in any other bot, or only when an add alert arrives.

A TradingView bot follows one direction. A strategy that goes both long and short needs two bots, one for each direction, and a signal that does not match the bot's direction is refused. If you prefer, you can let an opposite entry signal close the open trade; the bot still never opens a trade in the other direction.

Rehearse before you risk money

Two practical points about testing.

First, a bot driven by outside signals cannot be backtested in Bitcator: the signals are produced in TradingView, so the backtest has nothing to replay. Test the strategy on TradingView's own strategy tester, remembering what our article on backtesting without fooling yourself says about fees and overfitting.

Second, run the connection itself on paper trading first. Set up the bot with virtual money, let a few real alerts fire, and read the signal log: you will see which were accepted, which were refused and why, and how long they took to arrive. That is where you find a message with a typo, an alert on the wrong ticker or an age limit that is too tight for your strategy, at no cost.

A short checklist

  • Generate the secret, copy the address and the message into the alert, and keep the secret private.

  • Keep time and id in the message; set the maximum signal age to your strategy's speed.

  • Decide who exits: the bot's take profit and stop, or your exit alert.

  • Set an amount cap if you let alerts choose the trade size, and leave it empty if you do not.

  • Run on paper until the log shows what you expect.

An alert is only as good as the rule behind it. What the bot adds is discipline: it executes every signal that passes your limits, ignores the ones that do not, and tells you why.

This article is for educational purposes only and is not investment advice. Trading crypto assets carries a high risk of loss. Past results, including the price statistics above, do not guarantee future results.

Turn your TradingView alerts into bot trades, without giving up your safety limits · Bitcator