How to get EA to access sounds in C: > Program Files (x86) > MetaTRader 4 > Sounds?
MetaTrader is "sandboxed" and only allows the function PlaySount() to access sound files in its designated directory (and subdirectories): "<terminal_directory>\Sounds".
EDIT: Corrected the above file location!

- docs.mql4.com
MetaTrader is "sandboxed" and only allows the function PlaySount() to access sound files in its designated directory (and subdirectories): "<Data Folder>\Sounds".
MetaTrader is "sandboxed" and only allows the function PlaySount() to access sound files in its designated directory (and subdirectories): "<terminal_directory>\Sounds".
EDIT: Corrected the above file location!
Ok, so basically I'd have to manually put the sounds I want in that folder, it sounds like...?
You can also put your .wav files into the \MQL4\Files\ folder
if ( !PlaySound("\\Files\\sound.wav") ) { Print("PlaySound() failed to play the sound file."); }
Sweet, thanks! I'll look into that.
Strangely now though, my sounds are still playing even after I remove them from the data folder Sounds folder, so I can't test the method you share here.

- Free trading apps
- Free Forex VPS for 24 hours
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all!
I'm trying to use the PlaySound() function, and my EA is grabbing the sound files from my MT4 install's data folder. There are somehow a couple of files in that folder, but the ones I want are in the MT4 application folder in Program Files (x86).
How can I get my EA to look in the latter instead of the former?