Alerts for Once Per Bar Close not alerting but works fine for Only Once and Once Per Bar
Hi. I have alerts set on price moving up x% in 1 bar for the 5 minute timeframe using 'Once Per Bar Close'. But I never receive alerts. I get alerts fine with the exact same settings on 'Only once' and 'Once per bar'. The problem with these alerts is I get false alarms on movement because it alerts as soon as that movement happens, vs waiting on the bar close. Is this a bug?
I just created an alert for BTC to trigger on .01% increase in 1, 1 minute bar using 'Once per bar close'. It's been 20 minutes and no alerts. I just switched it over to 'Once per bar' and started to receive alerts fine.
Not sure if it has anything to do with it but I'm using regular candles.
Ultimately, I'm just trying to get an alert for a price % movement on the bar close.
Thanks!
Posted Mar 25, 2022, 5:58 PM UTC
Alerts have always been sketchy to diagnose. As a backend programmer that uses Tradingview alerts to automate trading for fun, I can say I definitely spent a bit of time playing with alerts and delayed notification issues. There’s always been controversy and a lot of things can relate to some unknown forces lol. However, you might have better luck using the alert() function in a script and using alert.freq_once_per_bar as the frequency parameter within the function. Basically what I’m saying is see if not using the alertcondition() function helps. Just in case, you should also be aware of the differentiation in how the real-time close works in PineScript and the actual bar close, which notes the last update of each bar.
Made note of the functions and parameters. Been thinking about looking into PineScript lately, this is another good reason. Appreciate the feedback.