Need help with adding Alerts that not flood me!, please help! - page 2

 
pro_:

Next time just do a search of your problem. A lot of things have been solved by other people already and you can almost always find a solution before creating a new topic.

The following code will give alert only once per bar. (Search for "alert once" and you might find other solutions also)

And by the way you need to work on the logic of the alert, because this way it may give you both BUY and SELL alerts on the same bar :). No good!

Except don't use Bars as it isn't a reliable method . . . what happens when Bars = Max bars on chart ? use time instead.
Reason: