Daytrader21 said:
Actually the the indicator computes yesterday's Day Range (Daily High - Daily Low), the previous 5, 10 and 20 days ranges. And it calculates the "Average Day Range" of these four ranges (yesterday's+ Prev 5 Day Range + Prev 10 Day Range + Prev 20 Day Range)/4.
Check out your indicator inputs at the bottom you have: First_av=5; Second_av=10; Third_av=20.
So, if yesterday's Day Range was 80, the Previous 5 Day Range was 110, the Previous 10 Day Range was 90 and the Previous 20 Day Range was 120, then the Average Day Range would be 100.
This is a smoothed simple moving average of the ADR. I noticed that some days it was the same as the iATR some days different but usually not by much.
Also this is correct if you have set useATRFunction = False, Otherwise it uses the iATR function for the specified period- the default is 5 days. I modified it for my personal preference for the simpler faster number, it works for me.
“ But what is the formula for calculating ADR H/L “
from the Indi :
for(i=1;i<=First_av;i++)
R5 = R5 + (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/mPoint;
R5 = R5/First_av;
in this case the simple moving average of the daily hi minus daily low of the past 5 days. iATR uses the same basic formula.
“ We have other variable that we don't know what open daily candle time/ close daily candle time does ICT use? “
from the original ICT_ADR indicator:
int ADROpenHour= 0; // start time for range calculation (LEAVE AT 0. PROGRAM DOESN'T WORK PROPERLY OTHERWISE.)
int ADRCloseHour= 24; // end time for range calculation (LEAVE AT 24. PROGRAM DOESN'T WORK PROPERLY OTHERWISE.)
They can't be changed
“And my question is how do you project the High and Low? This are not dynamic figures, when I post the indicator on my chart it shows a static figure for ADR H/L that remain the same all day. It is like this indicator is already predicting the H/L limits.”
This is not what I read in the indicators code. At the opening bar for a new day :
if (today_open==0) {
today_open= Open[idxfirstbaroftoday]; // should be open of today start trading hour
adr_high= today_open + adr;
adr_low= today_open - adr;
today_high= today_open;
today_low= today_open;
Thus the upper and lower lines are 2ADR apart at the open and as price action progresses through the day they converge above and below the open based upon the current daily high and low until the calculated ADR is or isn't reached by the end of day. If the ADR is reached they will be the ADR apart otherwise they will be wider.
As I interpret the indicators display it is not predicting the H/L limits. It is providing a sophisticated wild ass guess as to what the daily range may be and a visual clue as to how far price action may continue either up or down that day. This is enough to allow me to evaluate possible risk to reward in trade setups.
Daytrader21 since it looked to me like you had examined the code and wanted to understand it I answered your questions using the indicators code. I hope it made sense to you and answered your questions.
I am not a professional coder. I like to understand what I am using and may make simple changes for my personal use. Sometimes I share. I do not provide support for them. Use them at your own risk.
Datavis- welcome to FXgears- please forgive me if this seems a rude reply to your first post but... The modifications you suggest are possible but it is not a priority for me to make them. What I have done works for me. Feel free to make the changes yourself or find some one who will.