so as I wrote in the title, I coded an Indicator that gives me an alert when the last candle crossed the 21 Ema. I also check, if the alert was allready send on that candle by saving and then checking the value Time.Now when I get an alert and change the timeframe on that chart, I get the same alert again. I guess thats because the Indicator gets loaded again.does anyone know how to stop the indicator from sending the alert again, when i change the timeframe?
I'm only looking at bar 2/1 for the alert.
oh and forgot to tell I'm on mql4.can you explain what you mean with prev_calculated is zero?I tried to save it in a library cause I found that here somewhere but that doesnt work either
oh and forgot to tell I'm on mql4.
Completly forgot to check :D
I just had an idea, that the problem might be that I use Time to check if the alert was allready sent for the current bar.Because if I switch the timeframe, Time contains the opening Time of a bar of a different timeframe right?So how can I do that differently?