Urgent Help: MACD CROSSOVER

 
I have this piece of code in my EA:

if(MacdCurrent > 0 && MacdCurrent > SignalCurrent && MacdPrevious < SignalPrevious)
{
Alert("BUY order opened : ", Symbol());

Questions:
1. I get dozen of alerts in a very short timeframe, why? What can I do to make it stop?

Much thanks.

Ed
 
You specify a condition when to send the alert but once the condition is fulfilled, you get an alert for every new tick. This is a very common problem and you can find it in the forums with the search function.

'1 Trade per Bar'
 
Thanks.
Reason: