Re: Dashboard Type Indicators for MT4

180
Here are the ADR calculations for future use...

Code: Select all

//+---ADR------------------------------------------------------------------------------------------------------------+
   string OPEN=""; OpenToday=iOpen(SymPair,1440,0); OPEN=(DoubleToStr(OpenToday,DecNos)); 
   string PIPS=""; CLOSE=iClose(SymPair,1440,0); PIPS=DoubleToStr((CLOSE-OpenToday)/Point/pipsize,0);
   ADR1=0; ADR5=0; ADR10=0; ADR20=0; ADRavg=0; int a,b,c; int ypos=0;
                             ADR1=(iHigh(NULL,TimeFrame,1)-iLow(NULL,TimeFrame,1));
   for(a=1;a<= 5;a++)  ADR5= ADR5+(iHigh(NULL,TimeFrame,a)-iLow(NULL,TimeFrame,a));
   for(b=1;b<=10;b++) ADR10=ADR10+(iHigh(NULL,TimeFrame,b)-iLow(NULL,TimeFrame,b));
   for(c=1;c<=20;c++) ADR20=ADR20+(iHigh(NULL,TimeFrame,c)-iLow(NULL,TimeFrame,c));
   ADR5=ADR5/5;  ADR10=ADR10/10;  ADR20=ADR20/20;  ADRavg=(((ADR1+ADR5+ADR10+ADR20)/4))/Point/pipsize;
Xard777
These users thanked the author xard777 for the post (total 5):
太虚一毫, chris006, erynade, Jedidiah, RodrigoRT7
XARD: If Carlsberg made charts... Probably the best charts in the world


Who is online

Users browsing this forum: BeatlemaniaSA, DotNetDotCom [Bot], Intrest 1, vvFish and 98 guests