Indicadors with alert

 
Greetings to all,

I to discover this sufficiently beneficial pointer and it would like to know of somebody is possible to introduce an alert one to go off all time that a new signal to appear. I am very thankful who to give this aid to me.

Sincerely,

Eduardo Robson

//+------------------------------------------------------------------+
//| super-signals. mq4 |
//| Copyright © 2006, Nick Bilak, beluck[AT]gmail. com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Nick Bilak"
#property link "https://www.forex-tsd.com/"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_width1 2
#property indicator_color2 Lime
#property indicator_width2 2
extern int SignalGap = 4;
int dist=24;
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[i]=High[hhb]+SignalGap*Point;
if (i==llb)
b2[i]=Low[llb]-SignalGap*Point;
}
return(0);
}
Files:
 
Eduardo:
Greetings to all,

I to discover this sufficiently beneficial pointer and it would like to know of somebody is possible to introduce an alert one to go off all time that a new signal to appear. I am very thankful who to give this aid to me.

Sincerely,

Eduardo Robson

...
if( i == hhb ) {
    b1[i]=High[hhb]+SignalGap*Point;
    PlaySound( "alert.wav" );
}
if( i == llb ) {
    b2[i]=Low[llb]-SignalGap*Point;
    PlaySound( "alert.wav" );
}
...
When the arrow is drawn, an alert is sounded. However the problem is that when the arrow is drawn, the signal is already late by at least dist/2 bars. So I think this is not a good indicator.

PS. Look also zig-zag indicator.
 
I perceived this. Now using this pointer in the timeframe M30 and H1 the signals are more necessary. More I am been thankful for the gentility.

If somebody will have some indication will be well very well coming.

Good Businesses
Eduardo
 
Hello! I need help in understanding the code. Could someone explane to me what signalGap is and what it is used for?