Make or copy a sound file, example YourSound.wav, put it into /sounds directory and in your code
Playsound(YourSound.wav);
to play it.
If you want your little custom noise to play with the Alert(...) command, then change the sound file
name associated with Alert in the Tools/Options/Events menu item.
Thanks phy, but I already try it. What I want is to appearing a message box like
an Alert fuction but with a custom sound. Any suggestion?
Anybody?
I'm affraid that it's not possible to call messagebox in a custom indicator
The MessageBox function creates, displays, and operates message box. The message
box contains an application-defined message and header, as well as a random combination
of predefined icons and push buttons. If the function succeeds, the returned value
is one of the MessageBox return code values.
The function cannot be called from custom indicators since they are executed within interface thread and may not decelerate it.
So it is not possible to do it directly from MQL4 code?
int MessageBox( | string text=NULL, string caption=NULL, int flags=EMPTY) |
The function cannot be called from custom indicators since they are executed within interface thread and may not decelerate it.
So it is not possible to do it directly from MQL4 code?

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
Thank you