It's very easy. Try following code.
if(TimeCurrent()-lasttime>=TimeDeley && range>int(BarPoint)) { //PlaySound("Symbol().wav"); string wavefile = StringSubstr(Symbol(),0,6) + ".wav"; PlaySound(wavefile); lasttime=TimeCurrent(); }
Naguisa Unada:
It's very easy. Try following code.
Thank you very much for your help, it works.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have an indictor that gives a sound alert when the price moves a certain amount, adapted from - https://www.mql5.com/en/code/14388.
For each currency pair it gives a different sound alert, see extract below.
This current solution takes up 300 lines of code for all the currency pairs my broker deals with.
I thought an easier solution would be to match the file name with the current chart's symbol, such as the following (which obviously doesn't work):
Does anyone have any idea on how to make the above work, or another solution to this?
Thank you.