How to create a looping sound alert when the bid hits a specific price?

To add comments, please log in or register
Austin Combs
747
Austin Combs  

I'm trying to figure out a way to create a looping alert that won't shut off until I click a button on the MT4. I need it to continuously loop forever until it's disabled. I'm using my MT4 to wake me up during the night when the price hits a certain target, but to do that I need to have my MT4 play a custom audio file that simulates a train horn (don't ask lol). I couldn't find any utilities in the marketplace to help me with this. Also, the Alert function on MT4 isn't suitable for what I need because it only plays the alert for 1 min and then automatically shuts off, no matter how long the .wav file is.


Any ideas?

Thanks

Marco vd Heijden
Moderator
8625
Marco vd Heijden  
OnTick()
{
 PlaySound("OK.wav");
}

Have you tried?

Keith Watford
Moderator
15013
Keith Watford  
Marco vd Heijden:

Have you tried?

When there is an alert, place a button on the chart.

Sound the alert using OnTimer()

Click the button to kill the timer and delete the button.

Nimal Gamage
314
Nimal Gamage  

When you do the alert edit the alert to play a file and create a batch file to play your longer WAV or MP4 file. then it will play as long as you want. 


batch file can be as simple as 

start alert.mp4

This will curcumvent the 1 hour time limit.  

Files:
alert.png 14 kb
To add comments, please log in or register