Back to guides
TradingView Alert Not Triggering? 8 Causes and How to Fix Them

TradingView Alert Not Triggering? 8 Causes and How to Fix Them

Benjamin F., Co-founder7 min read

When a TradingView alert is not triggering, its log stays empty at the moment you expected it to fire, which tells you something useful straight away: the webhook, the receiving service and the broker never ran, so none of them can be the cause. The problem lies in the alert's own state or settings, or in the way the script behaves on live bars compared with the chart history you are looking at.

Start in the Alerts panel. If the alert shows as stopped or expired, the fix is in the first two sections below, and if it shows as active but still never fires, work through the remaining causes in order.

1. The TradingView alert expired#

Every alert carries an expiration date, set in the Expiration field when you create or edit it, and once that time passes the alert simply stops without anything on the chart telling you so. Depending on your plan, you may be able to make the alert open-ended, and otherwise you need to edit it and move the date forward before it lapses.

2. The alert triggered too often and TradingView stopped it#

TradingView stops an alert that triggers more than 15 times in 3 minutes, and for watchlist alerts the same limit applies per symbol, with a separate ceiling of 1,000 triggers in 3 minutes for the whole alert. A script that calls alert() on every tick can reach 15 within seconds in a fast market, after which the alert stays stopped until you restart it by hand. Change the condition so that it fires less often, for example once per bar instead of on every call, before you restart it, or it will simply stop again.

3. The trigger setting waits for the bar to close#

Once per bar close fires only when the bar finishes, which means that on a 4-hour chart a crossover can be visible for hours before the alert runs. Only once fires a single time and then stops for good, while Once per bar fires at the first qualifying moment in each bar, which can be earlier than you expect and before the condition is confirmed. A condition that has already closed cannot disappear after the alert has gone out, which makes bar close the safer choice for alerts that place orders.

4. You edited the script, but the alert still runs the old one#

TradingView's Pine Script alert documentation explains that an alert saves its own copy of the script, its inputs, and the chart's symbol and timeframe at the moment you create it. Later changes to the code, the inputs or the chart never reach an alert that is already running, so editing the chart changes what you see without changing what the alert evaluates. Delete the alert and create a new one whenever you change the code, an input, the symbol or the timeframe, and do the same after the author of a published script releases an update.

5. The condition only appeared on historical bars#

TradingView alerts only trigger on the realtime bar. An entry you can see on past bars was calculated with the whole bar already known, whereas a live bar can reach a different result as its price moves. A strategy that looks good on the chart can therefore stay silent in real time when its conditions depend on values that are only final at bar close, on future data, or on a higher timeframe that has not closed yet.

TradingView calls this repainting. If an alert keeps missing entries that you can see on the chart afterwards, watch the strategy live for a few bars and compare what it does with what the history shows. No alert setting can make a repainting script match the past, so the fix has to be in its code.

6. The wrong condition or alert type is selected#

A strategy can send two kinds of alert: order fills, which fire when the strategy's broker emulator fills an order, and calls to alert() written into the code. If the strategy only uses one of them, selecting the other means the alert never fires, and on an indicator you should check that the condition dropdown names the exact plot or alertcondition() you meant. Many scripts expose several with similar names.

On a strategy that uses alert_message, the alert's Message field also needs the {{strategy.order.alert_message}} placeholder. Without it, the alert fires but sends whatever default text happens to be in the box. Our guide to sending commands on order fills shows how to set up alert_message in Pine Script and fill in the Message field.

7. The strategy only calculates at bar close#

Pine strategies calculate once per bar by default, at the close, unless calc_on_every_tick is enabled, so a strategy alert fires after the bar closes even when the alert's trigger setting suggests it could fire sooner. That is usually the behaviour you want, and it also explains why an order-fill alert tends to arrive later than an indicator alert on the same chart.

8. The chart's data feed keeps different hours from your broker#

An alert follows the data feed of the chart it was created on, and a futures or exchange feed keeps its own sessions and holidays. An alert built on that feed can therefore stay silent while your broker's CFD is trading, or fire while the broker is closed, so create the alert on a feed whose hours match the market you trade, or plan around the gap.

How PineHook helps once the alert fires#

PineHook cannot make TradingView fire an alert, but it removes the guesswork about what happened next. Every alert that reaches PineHook gets a row in Dashboard → Signal Logs, so an empty log in TradingView combined with no row in PineHook confirms that the alert never fired. When a row does exist, it tells you in plain words whether the trade executed, was blocked by one of your settings, or was refused by the broker and why.

PineHook also guards against the opposite problem, where an alert fires more than you meant it to. An identical message arriving again within about 12 seconds is dropped as a duplicate, and giving each new alert a unique id= keeps genuine repeats apart from accidental ones. Before a strategy goes live, Alert Test & Validate checks the exact message your alert will send, and our strategy alerts guide shows how to build that message inside Pine Script so the order details travel with each fill.

You can create a PineHook account without payment details and run your alerts against a demo account, which is the quickest way to see whether a strategy fires when you expect it to.

When the alert fires but nothing happens#

If TradingView's log shows the trigger, the alert is working and the problem lies further along the route. TradingView webhook not working covers delivery, and webhook delivered but no trade covers what happens after the receiver has accepted the message.

FAQ#

Do TradingView alerts work with the browser closed?

Yes. Alerts run on TradingView's servers, so your chart, browser and computer can all be closed, and what has to stay online is whatever receives the alert and places the trade, such as an MT5 terminal running the PineHook EA.

Do TradingView alerts fire in Bar Replay?

No. Replay plays back historical bars, and alerts only trigger on the realtime bar. Test an alert on a live chart instead, ideally on a short timeframe and a demo account so you do not wait long for a result.

How do I stop a TradingView alert firing twice for one entry?

Use Once per bar close, or Once per bar if you need the alert to fire inside the bar. Once per minute and alert.freq_all keep firing while the condition holds, which can send the same order more than once.

TradingView is a trademark of its owner, and PineHook is an independent product that is not affiliated with, endorsed by, or sponsored by TradingView. Leveraged trading carries a high risk of loss, so test any automated setup on a demo account before you trade it live.

ShareX

Related posts