Hello. I was just wondering whether this is an unanswerable question, or just a
dumb question? I searched to see if it had already been asked, but, never found
anything similar. Does anyone have ideas regarding the functionality of the Alert()
vs PlaySound() and why they would, seemingly, conflict?
Hello,
I am looking also for the same answer, but I have an idea about this, and it is that the commands are triggered too fast to allow both sounds to play in sequence. .. there should be some delay time to add for the playsound, like 10 seconds which seems to be the usual minimum as per the Alert tab in the terminal.
The only way to have a different file playing as "alert" would be to rename it to alert.wav as I'm afraid the code is set up like that.
Only *.wav files work with the Playsound, but anyway those would be short-time files so the *.wav length of file is not that heavy.
Have you tried Playsound twice instead? Just thought this could work, I am going to try it.
Hope it helps.
P.S. Thinking of it... both might work but won't activate the alert window :(
.
I am looking also for the same answer, but I have an idea about this, and it is that the commands are triggered too fast to allow both sounds to play in sequence. .. there should be some delay time to add for the playsound, like 10 seconds which seems to be the usual minimum as per the Alert tab in the terminal.
The only way to have a different file playing as "alert" would be to rename it to alert.wav as I'm afraid the code is set up like that.
Only *.wav files work with the Playsound, but anyway those would be short-time files so the *.wav length of file is not that heavy.
Have you tried Playsound twice instead? Just thought this could work, I am going to try it.
Hope it helps.
P.S. Thinking of it... both might work but won't activate the alert window :(
.
stockwet:
2. Is there a way to get the Alert() function to use a different WAV file?
Thanks.
stockwet
Found this: 'Secrets of MetaTrader 4 Client Terminal: Alerting System'
2. Is there a way to get the Alert() function to use a different WAV file?
Thanks.
stockwet
Thank you very much, I will try it as soon as markets open :)
Use script and you no need waiting of markets opening.
Hi guys,
I am just unable to send an e-mail during int start (). Is there any thing I am missing? I thought that just this function call SendMail ("MT4 START", " Looking for HELP"+DoubleToStr(Ask,Digits)); would send me an e-mail, but....
Detail: if I use this call SendMail("MT4 START", " Looking for HELP"+DoubleToStr(Ask, Digits)); at int init(), I do receive an-email every time that my EA starts.
Thanks a lot.
I am just unable to send an e-mail during int start (). Is there any thing I am missing? I thought that just this function call SendMail ("MT4 START", " Looking for HELP"+DoubleToStr(Ask,Digits)); would send me an e-mail, but....
Detail: if I use this call SendMail("MT4 START", " Looking for HELP"+DoubleToStr(Ask, Digits)); at int init(), I do receive an-email every time that my EA starts.
Thanks a lot.
Ok,
Let me be clearer: If I look at this small program bellow, I would guess that I should receive two e-mails. However, I am receiving just one e-mail from the initialization part of the program. Moreover, the sound "alert.wav" doesn't play at all. So please, could someone help me here. Thank you a lot.
Cheers,
__________________________
int init()
{
PlaySound ("phone.wav");
SendMail("Init", "Yes Ok");
return(0);
}
int start()
{
PlaySound ("alert.wav");
SendMail("Start", "No Ok");
return (0);
}
__________________________
Let me be clearer: If I look at this small program bellow, I would guess that I should receive two e-mails. However, I am receiving just one e-mail from the initialization part of the program. Moreover, the sound "alert.wav" doesn't play at all. So please, could someone help me here. Thank you a lot.
Cheers,
__________________________
int init()
{
PlaySound ("phone.wav");
SendMail("Init", "Yes Ok");
return(0);
}
int start()
{
PlaySound ("alert.wav");
SendMail("Start", "No Ok");
return (0);
}
__________________________
brspMA:
Ok,
Let me be clearer: If I look at this small program bellow, I would guess that I should receive two e-mails. However, I am receiving just one e-mail from the initialization part of the program. Moreover, the sound "alert.wav" doesn't play at all. So please, could someone help me here. Thank you a lot.
Ok,
Let me be clearer: If I look at this small program bellow, I would guess that I should receive two e-mails. However, I am receiving just one e-mail from the initialization part of the program. Moreover, the sound "alert.wav" doesn't play at all. So please, could someone help me here. Thank you a lot.
Your whole program runs in about one millionth of a second, so probably phone.wav is still playing, when you want to play alert.wav and it seems the sounds are not cacheing. This is may be the same with the emails. Use it as an EA instead of script and wait for a new tick.
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
Alert();
PlaySound();
SendMail();
The Alert and SendMail functions work, but not PlaySound. If I disable the Alert() function, then PlaySound works fine. It also works fine with MessageBox(), though, I prefer the Alert function.
1. Is there a way to get these functions to work together? I am referencing a different WAV file in PlaySound() then the one used by Alert().
2. Is there a way to get the Alert() function to use a different WAV file?
3. Is it possible to use an MP3 file with the PlaySound function?
Thanks.
stockwet