Sound alert instead of message box

Anky Five
47
Anky Five  

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

Soconia UG
233
Werner Klehr  

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,
Anky Five
47
Anky Five  

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...