EA & Platform Connectors Intermediate

Alert Firing Frequency

Also known as: Once Per Bar, Once Per Bar Close, alert trigger frequency, alert repeat setting

What is it?

Alert firing frequency is the setting that decides when a chart alert is allowed to trigger: the moment its condition first turns true inside a forming candle, or only after that candle has closed. On TradingView the two options you will use for automation are Once Per Bar, which fires mid-candle as soon as the condition is met, and Once Per Bar Close, which waits for the bar to finish before evaluating anything. The difference decides whether your bot acts on a fact or on a guess.

Side by side

Once Per Bar vs Once Per Bar Close

Once Per Bar

  • Fires the moment the condition turns true, mid-candle
  • Gives you the earliest possible entry on a real move
  • The condition can reverse before that same bar closes
  • Live results drift away from a bar-close backtest

Speed, paid for with confirmation

Winner

Once Per Bar Close

  • Waits for the candle to finish before evaluating
  • Only fires on conditions that actually held to the close
  • You give up whatever the rest of the bar was worth
  • Matches how a standard backtest measured the strategy

Confirmation, paid for with the rest of the bar

The same script produces two different trade lists depending only on this setting; bar close is what your backtest assumed.

A condition that is true halfway through a candle can stop being true before that candle closes — a moving-average cross can un-cross, a close above resistance can end up a close below it. Once Per Bar buys you speed and costs you certainty; Once Per Bar Close buys you certainty and costs you the rest of the bar. On a 15-minute chart that gap is up to 15 minutes of price movement, which on a fast instrument is the whole move.

Suppose a crossover appears four minutes into a 15-minute candle and price reverses at minute eleven: Once Per Bar already sent the order and you are long into a reversal, while Once Per Bar Close never fires at all. Note that this is not the same problem as repainting, where a script's historical drawing disagrees with what it showed live, nor the same as a confirmation candle, which is a manual pattern rule — this is purely the alert's own firing rule, and it applies even to a perfectly non-repainting script.

Why it matters: It decides whether your automation trades a condition that is confirmed or one that can still reverse, which is the most common cause of unexplained bad entries.

Trade impact: High

The same script can produce completely different trade lists depending only on this one setting.

Real-world example

A GBP/USD breakout alert set to Once Per Bar fires nine minutes into an H1 candle at 1.2740; price closes the hour back at 1.2705, so the bar-close version of the same alert never triggers.

How SignalBots handles it

Signals delivered through SignalBots to TradingView webhooks and the MT4/MT5 Connector carry the bar context they were evaluated on, so you can match your alert's firing rule to how the setup was actually tested. See /risk-warning.

Pro tip

Backtest the strategy on bar-close logic, then ship the alert on Once Per Bar Close too — a live alert that fires earlier than your test did makes the backtest meaningless.

Common pitfalls

Leaving alerts on Once Per Bar because they feel faster, then wondering why live results are far worse than the backtest that assumed closed bars.

FAQs

Frequently asked questions

Which setting should I use for a webhook bot?

Once Per Bar Close in almost every case, because it is the only one that matches how a standard backtest evaluates signals. Use Once Per Bar only when the strategy was explicitly designed and tested for intrabar entries.

What is the difference from Only Once?

Only Once fires a single time and then the alert stops permanently, which suits a one-off price notification. Once Per Bar and Once Per Bar Close keep running bar after bar, which is what an ongoing automated strategy needs.

Is Once Per Bar the same as repainting?

No. Repainting is a script showing different values on historical bars than it showed in real time. Once Per Bar is an honest, real-time firing of a condition that simply has not been confirmed by the bar's close yet.

Can an alert fire more than once in the same candle?

Not with these two settings — both cap it at one trigger per bar. Higher-frequency options exist on some platforms, but for order automation they invite duplicate entries and are best avoided.

Does bar close guarantee the signal is right?

No. It only guarantees the condition was true when the bar finished. The trade can still lose, and price can move against you immediately on the next bar. Your capital is at risk. See /risk-warning.

Trading involves substantial risk of loss. Historical and backtested results do not guarantee future performance. Read the full risk warning.

Add SignalBots as a preferred source on Google Add SignalBots as a preferred source on Google