Sound not stop.

 

I play a custom sound when trades close like so, and at end of the last friday, some trades were closed right on end of trading close, and my sound got frozen, and wouldnt stop until i forced mt4 to shut down.

I already had PlaySound(NULL) on DeInit, OnInit and on the next line below my PlaySound("abc.wav") is played.

Where else should I place the PlaySound(NULL), to stop this from happening?

 
  1. You do not need a PlaySound(NULL) ever. It will play once and stop.

  2. It is your test that is broken.

    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)

Reason: