Alerts on ang_Amp_ZZ direction changing.
Dear Codersguru, is it possible an alert when ''ang_Amp_ZZ'' changing direction?? Tks vm in advance.
Hi hua,
Happy new year!
Please try this code (I didn't test it because it's Saturday)
//-------------ang_Amp_ZZ---------------
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 LemonChiffon
#property indicator_color2 LemonChiffon
#property indicator_color3 Blue
//--------------------------------
extern int d=40;
//---------------------------------
double ha[],la[],zz[];
double hi,li,hm,lm,di,j;
int f,f1,ai,bi,aii,bii,f0,aibar,bibar;
di=d*Point;
//----------------------------------------------
int init() {
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ha);
SetIndexBuffer(1,la);
SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,2);
SetIndexBuffer(2,zz);
return(0); }
//================================
int start() {
//--------------------------------
int i,n,cb,cbi,cbn,fs,bar;
//------------------------
//cb=IndicatorCounted();
//if (cb<0) return (-1);
//if (cb>0) cb--;
//cbi=Bars-cb;
//if (Bars1) fs=0; bar=Bars;
//if (fs==0) {cbi=Bars-1; cbn=Bars-1; if (cbi<0) return(0); fs=1;}
cbi=Bars-IndicatorCounted()-1;
//-----------------------
//cbi=cbi+1;
for(i=cbi; i>=0; i--){
if (i>=Bars-2) {hi=High; li=Low;}
//==============================================================
if (Low>hi) {hi=Low; if (hi>=li+di) li=hi-di;}
if (High<li) {li=High; if (li<=hi-di) hi=li+di;}
//------------------------------------------------------------------------------------
if (High>hi && Low
if (f==0 && High>hi) {hm=High; ai=i; f=1;}
if (f==0 && Low<li) {lm=Low; bi=i; f=2;}
if (f==2 && High>hi && f1!=2) {hm=High; f=1; f0=0; for (n=ai; n>=bi; n--) {zz[n]=High[ai]*(n-bi)/(ai-bi)+Low*(n-ai)/(bi-ai);} ai=i;}
if (f==1 && High>hm && f1!=2) {hm=High; ai=i; f0=0;}
if (f==1 && Low
if (f==2 && Low<lm && f1!=1) {lm=Low; bi=i; f0=0;}
//---------------------------------------------
if (i==0 && f0==0) {aibar=Bars-ai; bibar=Bars-bi; f0=1;}
if (f0==1) {ai=Bars-aibar; bi=Bars-bibar;}
if (i==0 && ai>bi) for (n=ai; n>=bi; n--) {zz[n]=High[ai]*(n-bi)/(ai-bi)+Low*(n-ai)/(bi-ai);}
if (i==0 && ai=ai; n--) {zz[n]=High[ai]*(n-bi)/(ai-bi)+Low*(n-ai)/(bi-ai);}
if (i==0 && f==1) {for (n=ai; n>=0; n--) {zz[n]=Close[0]*(n-ai)/(0-ai)+High[ai]*(n-0)/(ai-0);}}
if (i==0 && f==2) {for (n=bi; n>=0; n--) {zz[n]=Close[0]*(n-bi)/(0-bi)+Low*(n-0)/(bi-0);}}
if (i==0 && bi==0) {for (n=ai; n>=0; n--) {zz[n]=Low[0]*(n-ai)/(0-ai)+High[ai]*(n-0)/(ai-0); }}
if (i==0 && ai==0) {for (n=bi; n>=0; n--) {zz[n]=High[0]*(n-bi)/(0-bi)+Low*(n-0)/(bi-0); }}
//--------------------------------------------
ha=hi;
la=li;
Print(zz);
//cbi=cbi-1;
}
static string last_direction = "";
string current_dirction = "";
if ( (zz[1] - zz[0]) > 0 ) current_dirction = "down";
if ( (zz[1] - zz[0]) < 0 ) current_dirction = "up";
if(current_dirction != last_direction)
{
Alert("Direction has been changed " + current_dirction);
last_direction = current_dirction;
}
//------------------------------------
return(0); }Tks vm indeed. HAPPY NEW YEAR.
Alert script needed..
Hi Guru,
I'm wondering if it's possible to write a script or EA to alert on highest high and lowest low of the preceding 6 bars excluding current (zero) one.
There should be moving alerts for this zigzag breakout system (see attachments).
The idea is when a new bar enters and the old one leaves both alerts may take new values depending on the current 6 bar structure.
Thanks in advance
alp
Problem with the code for ''ang_Amp_ZZ''
Dear Codersguru, is it possible an alert when ''ang_Amp_ZZ'' changing direction?? Tks vm in advance.
Sorry,
My mistake!
Respectfully
Zack
please help me i love your indicator.
Hi guru,I luv this your indicator but i hav't understand how to use it. please i will like you to expain to me better how this indicator works in the market.and how can i understand the way it works please expain to me better. then please how can i interpret the indicator early so i we be able to forcast future price. please you can send track back into my box dl_wilson2000@yahoo.com
please help me
I like this indicator, but I dont know how to code, does this indicator can add in alert/signal . thank you .
Indicator news
hello all trader
i need somebody help me correction this indicator. Actually this indicator can use for last year only and until now not function, i don't know what happen and i hope somebody can repair or rebuilt again. This indicator showing vertical lines in chart, text of news, color for impact level news and also alert before news. this indicator from andre9 (thanks to u)
thanks for for any helper me
hello all trader
i need somebody help me correction this indicator. Actually this indicator can use for last year only and until now not function, i don't know what happen and i hope somebody can repair or rebuilt again. This indicator showing vertical lines in chart, text of news, color for impact level news and also alert before news. this indicator from andre9 (thanks to u)
thanks for for any helper me



I think that is the website problem or you need to update the link in the mq4 file.
the website is http://www.dailyfx.com/calendar/Dailyfx_Global_Economic_Calendar.csv
save above file in to desktop
and using meta4 editor to change line 147 to where is your Dailyfx_Global_Economic_Calendar.csv
I think that would work.
because when I copy all the link the website told me it is busy.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear Codersguru, is it possible an alert when ''ang_Amp_ZZ'' changing direction?? Tks vm in advance.