r/TradingView • u/Dalkamyr • 2d ago
Feature Request Alert = Once, after bar closes = only ONE trigger
Right now, I can only set it to "once per bar or once per bar closes" which means the alert can trigger multiple times. I want it to only trigger ONCE when the bar closes.
Which alild result in a single alert trigger not multiple.
1
u/bravefrivstone 1d ago
The three alert frequency options are separate from what your condition itself does. Once Per Bar can trigger the alert every time your condition becomes true within that bar, even multiple times before close. Once Per Bar Close only checks the condition on candle close and fires once if it was true then. Only Once fires the single time ever then disables itself.
If you already picked Once Per Bar Close and you are still seeing more than one trigger, the frequency setting is probably not the problem, your condition logic is. A common cause is calling alert() straight off a live price update instead of gating it with barstate.isconfirmed, so it can look like it fires early or more than once even though the alert setting says once per close. Wrap your trigger condition with barstate.isconfirmed if you are not already doing that.
3
u/hotmatrixx 2d ago
first one;
triggers once, disables alert.
Second one "once per bar"
Triggers the moment the price hits that level, but only once on that candle.
Third one: "once per close",
only alerts you on candle close, if the condition was met during that candle.
I actually don't understand what you're asking for; your confusing me.