PlaySound MT4 Delay

 
I have an indicator that plays a sound when price passes a level (horizontal line) , The problem is there is no delay is sounding the alert (wav file) .. I do i put a delay in to do this in the code?
 
  1. You want “a sound when price passes a level.” Why would you want a delay?
         How To Ask Questions The Smart Way. 2004
              Be precise and informative about your problem

  2. You do know that Right-Click → Trading → Alert does exactly that?
 
William Roeder:
  1. You want “a sound when price passes a level.” Why would you want a delay?
         How To Ask Questions The Smart Way. 2004
              Be precise and informative about your problem

  2. You do know that Right-Click → Trading → Alert does exactly that?

The reason for the delay is that it sounds constantly in succession which can be quite irritating if you can disable it straight away, like a 10 sec delay or something between the alertswould be great

 
Daniel Costa: it sounds constantly in succession

You are looking at a signal. Act on a change of signal.
          MQL4 (in Strategy Tester) - double testing of entry conditions - MQL5 programming forum #1 2017.12.12

 
William Roeder:

You are looking at a signal. Act on a change of signal.
          MQL4 (in Strategy Tester) - double testing of entry conditions - MQL5 programming forum #1 2017.12.12


Thankyou!