I wanna Add Alert But i don't know how < can You Help Me ?
i wanna alert play sound : When The Green Arrow Shows Up The Alert Play Sound
When The Red Arrow Shows Up The Alert Play Sound
Thank You.
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_width1 1
#property indicator_color2 Lime
#property indicator_width2 1
#property indicator_color3 Red
#property indicator_width3 1
#property indicator_color4 Lime
#property indicator_width4 1
extern int SignalGap = 4;
extern int ShowBars = 500;
int dist=24;
double b1[];
double b2[];
double b3[];
double b4[];
int init() {
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1);
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1);
SetIndexStyle(2,DRAW_ARROW,STYLE_SOLID,1);
SetIndexStyle(3,DRAW_ARROW,STYLE_SOLID,1);
SetIndexBuffer(0,b1);
SetIndexBuffer(1,b2);
SetIndexBuffer(2,b3);
SetIndexBuffer(3,b4);
SetIndexArrow(2,234);
SetIndexArrow(3,233);
return(0);
}
int start() {
int k,i,j,limit,hhb,llb;
if (ShowBars >= Bars) ShowBars = Bars;
for (i=0;i<ShowBars;i++) {
b1[i]=0;
b2[i]=0;
b3[i]=0;
b4[i]=0;
hhb = iHighest(Symbol(),0,MODE_HIGH,dist,i-dist/2);
llb = iLowest(Symbol(),0,MODE_LOW,dist,i-dist/2);
if (i==hhb)
b3[i]=High[hhb]+SignalGap*Point;
if (i==llb)
b4[i]=Low[llb]-SignalGap*Point;
b1[i]=High[hhb];//+SignalGap*Point;
b2[i]=Low[llb];//-SignalGap*Point;
}
return(0);
}
can anyone help me with adding alert.
Moderator: moderators
-
- rank: <50 posts
- Posts: 2
- Joined: Sat Jun 25, 2016 7:35 am
- Reputation: 0
- Gender:
can anyone help me with adding alert.
Last edited by Almhdealmnfe on Sat Jun 25, 2016 6:36 pm, edited 1 time in total.
Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.
Thank you for your support.
-
- rank: 150+ posts
- Posts: 152
- Joined: Tue May 17, 2016 8:16 pm
- Reputation: 16
- Gender:
Re: can anyone help me with adding alert.
if (i==hhb) {
b3[i]=High[hhb]+SignalGap*Point;
Alert(Symbol()," Add you text here");
}
if (i==llb) {
b4[i]=Low[llb]-SignalGap*Point;
Alert(Symbol()," Add your text here");
}
b3[i]=High[hhb]+SignalGap*Point;
Alert(Symbol()," Add you text here");
}
if (i==llb) {
b4[i]=Low[llb]-SignalGap*Point;
Alert(Symbol()," Add your text here");
}
-
- rank: <50 posts
- Posts: 2
- Joined: Sat Jun 25, 2016 7:35 am
- Reputation: 0
- Gender:
Re: can anyone help me with adding alert.
Sacrophage wrote:if (i==hhb) {
b3[i]=High[hhb]+SignalGap*Point;
Alert(Symbol()," Add you text here");
}
if (i==llb) {
b4[i]=Low[llb]-SignalGap*Point;
Alert(Symbol()," Add your text here");
}
Sorry cuz i didn't mention this ( i wanna Sound Alert ... which i can choose the sound )
Thanks You.
-
- rank: 150+ posts
- Posts: 152
- Joined: Tue May 17, 2016 8:16 pm
- Reputation: 16
- Gender:
Re: can anyone help me with adding alert.
Try searching MQL4 reference in Metaeditor or search MQL4.com - shouldn't take more than 2 minutes... need to help yourself a bit too.
Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.
Thank you for your support.