Home › Guides › TradingView Alerts

TESTING TRAPFREENO ACCOUNTAUTOMATED TRADE BOTSTradingView AlertsWhy a good backtest can lieEDUCATION ONLY | NO SIGNALSEXAMPLE NUMBERS ARE LABELLEDAUTOMATED TRADE BOTSautomatedtradebots.com
A free page on tradingview alerts. Education only, with example numbers labelled.
TESTING TRAP

TradingView Alerts

Short answer

An alert on a charting site is a stored condition plus an action. When the condition becomes true, the site sends a notice, such as a pop-up, an email or a web request. Names, limits and options change, so check the current documentation.

An alert is a message that a condition became true on a chart. It is not an order, and anything that acts on it needs its own checks.

The page explains the idea in plain words, works through the arithmetic with a table, and shows how it hits grid, martingale and DCA bots, then tells you what to check before you run one.

  • A worked example with real arithmetic
  • How it hits grid, martingale and DCA bots
  • How to check for it before you run a bot
  • No advice, no signals, no profit promises

Last reviewed 28 October 2026. Education only, not advice.

Free, no account Runs in your browser Worked numbers shown Not advice Examples labelled

Ready to go further

Next: follow the whole chain

The TradingView bot guide walks through every link from chart to broker, how each one fails, and a test plan to run before any real money is used.

Read the chain guideFree, no account
Reading time5 minutes
Worked exampleExact arithmetic
Tools linked0 on this page
Reviewed28 Oct 2026

What is included

  • What it is, in plain words
  • The formula or mechanism, with exact arithmetic
  • How it hits grid, martingale and DCA bots
  • A check you can run before you switch a bot on

Who it is for

  • People who run or plan to run a trading bot
  • Anyone reading a backtest or a bot sales page
  • Readers who want the numbers, not the pitch
  • Not advice, and not a signal service
A made-up day of 20 alerts: what three faults cost$4.00Late40 seconds$15.00Duplicatedouble size$20.00Missedexit never sentA made-up example. Three faults in 20 alerts, size 10 units. Not a real result.
The picture for this page. Example numbers are made up unless the page says they were calculated.

Key facts

  • An alert on a charting site is a stored condition plus an action. When the condition becomes true, the site sends a notice, such as a pop-up, an email or a web request. Names, limits and options change, so check the current documentation.
  • A webhook is a web address that the site calls with a short message when the alert fires. A bot that listens at that address can read the message and decide what to do.
  • An alert can arrive late, arrive twice or not arrive at all. None of these is rare enough to ignore when money is attached to the result.
  • In our made-up day, 20 alerts at a size of 10 units had three faults, and those three cost a made-up $39.00 even though 17 alerts were fine.
  • Any webhook address or key you paste into a chart or a bot is a secret. Anyone who has it may be able to send orders to your bot. This is education, not advice.

What an alert is

A charting site watches prices for you. An alert tells it: when this condition is true, do this action. The condition might be a price level, a line crossing another line, or something a script of your own has worked out. The action is usually a notice to you. A site may check conditions at the end of each bar, or on every price change. Which one it uses matters, and the settings differ between alert types and change over time.

Notice what is missing. An alert has no idea about your account, your open positions or your risk limits. It says "this happened". Whether to act on it, and how, is somebody else's problem. That somebody is you, or a program you wrote.

How an alert can trigger a bot, in general terms

Many charting sites let an alert call a web address, called a webhook. The site sends a short piece of text, often in a structured format, to a server. If a program of yours runs at that address, it can read the text and send an order to a broker. This is the whole idea. The details of the message and the menus used to set it up vary and change, so this page does not give a recipe.

  • The sender is the charting site. It fires once per alert event, as it sees it.
  • The receiver is your program, at a public address. It must accept the message, check that it is genuine, and decide what to do.
  • The broker link is a separate connection from your program to an account. It has its own permissions, limits and failures.

Each of these three is its own place for a fault, and the fault in one is often invisible from the others. The full chain is in TradingView bot.

Delays, duplicates and missed alerts

Treat an alert as a message sent over the internet by a service you do not control. Messages like that can go wrong in a few well-known ways.

  • Delays. The condition may be true at one moment and the alert may arrive seconds later. Price keeps moving in between, so your order fills at a different price. See slippage. Condition checks at bar close add a delay by design.
  • Duplicates. Services often retry when they think a message failed. If your program was slow to answer, it may receive the same alert twice and place two orders. A program should remember the alerts it has handled and ignore repeats.
  • Missed alerts. The service may be down, an alert may have expired, or your program may be offline when the message arrives. A missed entry is a lost chance. A missed exit is a position that stays open when you thought it was closed.
  • Out of order. Two alerts sent close together may arrive in the wrong order, so a sell is handled before the buy it belonged to.
  • Repainting. A condition that looked true during a bar may be false by the close. An alert fired in the middle of a bar can disagree with the finished chart. See look-ahead bias.

A worked example with made-up numbers

A made-up bot receives 20 alerts in a day and trades 10 units each time. 17 are clean. Three are not. The numbers below were calculated by us on 29 Oct 2026 and are made up.

FaultWhat happenedPrice move against youMade-up cost
Late alertArrived 40 seconds after the condition0.40 a unit on 10 units$4.00
Duplicate alertSame entry sent twice, so 20 units instead of 101.50 a unit on the extra 10$15.00
Missed exitExit never arrived, so the position stayed open2.00 a unit on 10 units$20.00
TotalThree faults in 20 alerts$39.00

The three faults are 15 percent of the alerts and none of them is a bug in the rule. The rule could be fine and the day still cost money. This is why a backtest, which assumes every signal arrives once and on time, is kinder than the chain that runs it. See backtesting.

The same 20 alerts, split by what happened to them17On time, onceas intended1Latedelayed1Duplicatesent twice1Missednever arrivedA made-up example.
Most of the made-up alerts are fine. The few that are not decide the day.

Keeping a pasted URL or key safe

  • Treat a webhook address as a password. If it is long and random, that helps, but it is still a secret. Do not post it in screenshots, chats or public code.
  • Add a shared secret in the message. Have your program reject any message that does not carry it. Change it if it leaks.
  • Give the broker key the smallest permission. Trading only, with no withdrawals, and a limit on size if the broker offers one.
  • Put hard limits in the program. A maximum size, a maximum number of orders a day and a stop that does not rely on the next alert.
  • Beware of anything that asks for your keys. A page or tool that asks you to paste an account key to "connect" is holding the key. Understand who runs it first.

What an alert does not tell you

It does not tell you the fill price, that the order was accepted, or what your position now is. Your program must ask the broker for those and keep its own record. See paper trading for a safer place to find these faults first.

FAQ

Frequently Asked Questions

What is a TradingView alert?

It is a stored condition on a chart plus an action. When the condition becomes true, the site sends a notice, such as a pop-up, an email or a web request. It is a message, not an order.

What is a webhook?

It is a web address that a service calls with a short message when something happens. A program listening at that address can read the message and act on it.

Can an alert place a trade by itself?

On its own it only sends a notice. A trade happens only if another program receives the message and sends an order to a broker, and that program is yours to build and test.

Why did my alert arrive late or twice?

Messages travel over the internet and can be delayed, retried or lost. Services often resend when they do not get a quick reply. A receiving program should ignore repeats and expect delays.

Is it safe to paste a webhook URL or key?

Treat both as secrets. Do not share them, give broker keys the smallest permission with no withdrawals, and have your program reject messages that lack a shared secret.

Are the numbers on this page real?

Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.

Can I use this to decide whether to run a bot?

It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.

Is this financial advice?

No. It is general education. The numbers are made up, and it does not consider your situation.

Know the Risk Before You Run It

Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.

Trading carries a risk of loss