Watch how to download trading robots for free. So post a link to it - let others appraise it. You liked the script? Try it in the MetaTrader 5 terminal. The original code you'll find here is from bb. Some simple codes were added to produce a sound and email alert. Arrows display is also introduced on this latest version as shared idea inspired by Luis Gomez on his comment. The attached file you're seeing now is the updated version 3. Whenever the current price passes over the outside upper or lower band of the Bollinger, it will play a WAV sound and can be used as an audio alert indicator.
The WAV will keep playing as long as the current price is outside the bands. Additional option if you want to be alerted by email, a message notification will be sent when the price passes outside the band. The sound time delay on the 1st version was already removed, replacing it with a much better routine to handle the full playtime of any 3 second WAV file without slowing or obstructing the graphical plotting of the indicator on the chart.
For the email notification, with a proper SMTP email set up in the MetaTrader 5 settings, and with this indicator you will be able to receive a message alert on email. Whenever the price passes the upper or lower bands, it will trigger a command to send a one time email alert. It won't send another one till the price hits the indicator's middle band. The middle band will reset the flag or mark for the "ready to send" command allowing the indicator to send a message alert.
These are just a simple codes added on a working indicator to meet the objective. I'm not a professional programmer, but a hobbyist, and this is one of my beginner's programming in MQL5. Someone was asking for the same, so I thought I share this for those who might be interested out there for learning purposes.
I found some error while using version3. I missed out one important factor on the process, sorry A text instruction for SMTP setup is included in the attached zip file, along with two wav sound file that you can use for this indicator. Make sure the WAV files in use are placed in the default MetaTrader 5 sound folder usually located at c: You can change the WAV files on the source and compile it new, or just simply rename the wav file you want to use with the name being used in the code.
If arrow display is enabled: Minimize BOL's deviation value for better use of the indicator. Last comments Go to discussion 7. SearchSurf 29 Nov at This is the simplest way I could think of to add the arrow on this indicator I believe this is what you want the arrow to be for Daniel Osuna de la Rosa 3 Dec at SearchSurf 8 Dec at SearchSurf 30 Oct at I guess this won't work with MT4?More...