Sound alert instead of message box

 

Hello,

I have an indicator that displays messages. I would like a sound instead.

So I replaced this 

 if (SoundON==true && i==1 && CrossUp[i] < CrossDown[i] && alertTag!=Time[0]){
        Alert("EMA Cross Trend going Up on ",Symbol()," ",Period());
        alertTag = Time[0];
        } 
  }

by this

 if (SoundON==true && i==1 && CrossUp[i] < CrossDown[i] && alertTag!=Time[0]){
        PlaySound("Alert.wav");
        alertTag = Time[0];
        } 
  }

but it does not work.

Any help would be appreciated

Thanks

 

Hi Anky,

you should try to write the filename in lowercase:

PlaySound("alert.wav");

and you should check if the soundfile is in the "Sounds"-folder of your
MetaTrader installation.

Best regards,
 

Hello Werner,

Thanks for your reply.

I did check this and it is correct.

I also discovered that my indicator is not displaying new arrows when installed it just displays old ones.

This is probably the cause of my problem...

Reason: