Menu
Brokers
MT4 Forex Brokers
MT5 Forex brokers
PayPal Brokers
Skrill Brokers
Oil Trading Brokers
Gold Trading Brokers
Web Browser Platform
Brokers with CFD Trading
ECN Brokers
Bitcoin FX Brokers
PAMM Forex Brokers
With Cent Accounts
With High Leverage
Cryptocurrency Brokers
Forums
All threads
New threads
New posts
Trending
Search forums
What's new
New threads
New posts
Latest activity
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Reply to thread
Forums
Trading Platforms
MetaTrader Indicators
how i create an alert on mt4 indicator?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
[QUOTE="Predescu Florin, post: 143663, member: 52763"] please guys, can you tell me what is wrong here? i tried to put sound alert in this indicator, but it's not working. what i've done wrong? [code=mql4]//+------------------------------------------------------------------+ //| super-signals.mq4 | //| Copyright © 2006, Nick Bilak, beluck[AT]gmail.com | //+------------------------------------------------------------------+ #property copyright "Copyright © 2006, Nick Bilak" #property link "http://www.forex-tsd.com/" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Aqua extern int SignalGap=10; extern bool Alerts= false;//Enable Alerts extern bool Email = false;//Enable Email Notification extern bool Push=false;//Enable Push Notification int dist=10; double b1[]; double b2[]; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int init() { SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,1); SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,1); SetIndexArrow(1,233); SetIndexArrow(0,234); SetIndexBuffer(0,b1); SetIndexBuffer(1,b2); return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); int k,i,j,limit,hhb,llb; if (counted_bars<0) return(-1); if (counted_bars>0) counted_bars--; limit=Bars-1; if(counted_bars>=1) limit=Bars-counted_bars-1; if (limit<0) limit=0; for(i=limit;i>=0;i--) { hhb=Highest(NULL,0,MODE_HIGH,dist,i-dist/2); llb=Lowest(NULL,0,MODE_LOW,dist,i-dist/2); if (i==hhb) b1=High[hhb]+SignalGap*Point; if (i==llb) b2=Low[llb]-SignalGap*Point; } return(0); } //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //| //send sell signal //+------------------------------------------------------------------+ void SellSignal() { if(Alerts)Alert(ISN+": SELL SIGNAL ON "+Symbol()); if(Email)SendMail(ISN": SELL SIGNAL ON "+Symbol(),"Signal Sent From "+ISN+" Indicator."); if(Push)SendNotification(ISN+": SELL SIGNAL ON "+Symbol()); }//end of sell signal //+------------------------------------------------------------------+ //| //send buy signal //+------------------------------------------------------------------+ void BuySignal() { if(Alerts)Alert(ISN+": BUY SIGNAL ON "+Symbol()); if(Email)SendMail(ISN+": BUY SIGNAL ON "+Symbol(),"Signal Sent From "+ISN+" Indicator."); if(Push)SendNotification(ISN+": BUY SIGNAL ON "+Symbol()); }//end of buy signal[/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Top
Bottom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…