Script executes immediately when you load it to your chart,and executes only one time.
So you need to use an indicator.
//+------------------------------------------------------------------+ //| PriceBreakAlarm.mq4 | //| Copyright ?2010, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright ?2010, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #property indicator_chart_window //---- input parameters extern double PriceLevel=0.0; // if the Bid is larger PriceLevel,a alert will be executed. //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //---- if(Bid>PriceLevel) PlaySound("alert.wav");// Here you may select other sound under sound folder //---- return(0); } //+------------------------------------------------------------------+This is an example. You may set PriceLevel as you need.
My wife would kill me exactly 10 minutes after I put such an indicator onto any chart.
Greats Thank you so much!So putting only very quite sounds on it won't kill anyone. :)

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
Hi,
i'm looking for a script, which generates several scaled tones of sound when the price is moving.
For example when a currency pair is "average high" a lighter sound will be generated per tick.
Any ideas how this can be possible on MQL4 where i'am new.Please post. :)