help stop this indicator infinite alerts

 

Hi,

I've used this code in my armoury of indicators for a while now which basically alerts when MA cross and you can add a shift, set close, median etc to the weighting.

It's great - BUT, the alerts keep going off.

Tried to get in touch with the guy that programmed it but no joy. I've had a play myself but it kept locking up and I wondered if there is any way to limit it.

I.e a method to make it alert only 3 times for instance.

If anyone can guide me with this I'd really appreciate it

Kev

Files:
Reason: