Maximum iterations please help

 

Hello

I have an indicator that sends me push notifications every time I get an X amount of consecutive low/high bars. The problem with the indicator is that it keeps sending me notifications for every tick after the alert condition has been met. Could someone please help me change it so that I only receive one notification per candle.

Thanks in advance.

 
ndivho20: I have an indicator that sends me push notifications every time I get an X amount of consecutive low/high bars. The problem with the indicator is that it keeps sending me notifications for every tick after the alert condition has been met.
      if (IsConsecutiveHighBars(ConsecutiveHLbars,i)) {
You are looking at a signal. You can alert on a change of signal.
          Too many orders - MQL4 and MetaTrader 4 - MQL4 programming forum
 
whroeder1:
You are looking at a signal. You can alert on a change of signal.
          Too many orders - MQL4 and MetaTrader 4 - MQL4 programming forum
I do not understand what you mean. I just need me to alert me once per candle.
 
ndivho20: . I just need me to alert me once per candle.

Then code that.

 
please help me my alarm always give alert after the spike happens how can i modify it?
Reason: