I'm aware this indicator repaints but still find it usefull. However, I'm perplexed by some of the quirks that repainters have when trying to add something simple and it just will not behaving as expected. I have tried everything I know to have an alarm triggered when certain conditions are met. For example:
# Alarm for bull_vwap and bear_vwap when arrows are plotted
Alert(bull_vwap, "Bullish VWAP Signal Triggered", Alert.BAR, Sound.Ring);
Alert(bear_vwap, "Bearish VWAP Signal Triggered", Alert.BAR, Sound.Ring);
this code will simply not trigger the alarm. I have tried other approches such as :
# Alarm for bull_vwap and bear_vwap
rec bull_vwap_alert = if bull_vwap and !bull_vwap[1] then 1 else 0;
rec bear_vwap_alert = if bear_vwap and !bear_vwap[1] then 1 else 0;
Alert(bull_vwap_alert == 1, "Bullish VWAP Signal Triggered", Alert.BAR, Sound.Ring);
Alert(bear_vwap_alert == 1, "Bearish VWAP Signal Triggered", Alert.BAR, Sound.Ring);
Nothing seems to trigger the alarm? Can someone help? I want to be alerted whenever bull_vwap and bear_vwap plots even if it repaints later