## Average Daily Range (ADR) Projection

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

### Average Daily Range (ADR) Projection

Daily Range
DR = High[period] - Low [Period];
ADR = AVG ( DR, Period);
ATR is also supported, but is basically the same as ATR.

Multi Time Frame Version.
Allows selection of Time Frame

MT4/MQ4 version.
viewtopic.php?f=38&t=66195

Apprentice
FXCodeBase: Confirmed User

Posts: 19567
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Average Daily Range (ADR) Projection

Thanks a lot for your work apprentice !

This is a great indicator but I would like, instead of a line, have a zone called "confidence interval" around the ADR line.
By example for a confidence interval of 68% : [ADR-(SD/squareroot(N)) ; ADR-(SD/squareroot(N))]
where SD = Standard deviation on the period
and N = number of period
http://fr.wikipedia.org/wiki/Intervalle_de_confiance this link is in french but you can see formula in example 1
here is the link in english : http://en.wikipedia.org/wiki/Confidence_interval

I would like to use this indicator on MTF ADR Projection and :
. be able to chose which confidence interval to set
. show the ADR line or not
.set up the color of upward and downward zone (as we already have in marketscope for the box draw)
.set up the color of line (as we already have in marketscope for the box draw)

Please tell me if you can develop this indicator
Thanks
luigifx

Posts: 10
Joined: Tue Jun 14, 2011 2:11 pm

### Re: Average Daily Range (ADR) Projection

I downloaded the indicator and all I got on the chart was two green lines.
How do I get the text that is shown in your screen shot?
a1afx1111

Posts: 2
Joined: Tue Sep 13, 2011 7:49 am

### Re: Average Daily Range (ADR) Projection

Please try to move chart "in future" to see the text. For me this works.
sunshine

### Re: Average Daily Range (ADR) Projection

The MTF version is nice. Thanks.
Showing Daily Range projection on a 15m chart.
emjay-short

Posts: 34
Joined: Wed Mar 16, 2011 4:21 pm

### Re: Average Daily Range (ADR) Projection

is it possible to add an option to display it historically???

sabrumea

Posts: 34
Joined: Thu Aug 26, 2010 6:15 pm

### Re: Average Daily Range (ADR) Projection

Apprentice
FXCodeBase: Confirmed User

Posts: 19567
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Average Daily Range (ADR) Projection

thank you Apprentice, looking forward to have it. it is very useful indicator!

sabrumea

Posts: 34
Joined: Thu Aug 26, 2010 6:15 pm

### Re: Average Daily Range (ADR) Projection

Apprentice, sorry once you will do the historical option could you also fix the font of the text to make it a bit smaller? i was trying to do that myself but can not understand where is it in the code

sabrumea

Posts: 34
Joined: Thu Aug 26, 2010 6:15 pm

### Re: Average Daily Range (ADR) Projection

Apprentice,

i have created font

Code: Select all
`local font;function Prepare()     ...   font = core.host:execute("createFont", "Verdana", 10, false, false);       ...`

how should i call it now in the DrawLable1 function??
Code: Select all
`if TR[1] >TR[2] then            core.host:execute ("drawLabel", 1, source:date(source:size()-1) + 3*size , MAX + 2*(MAX-MIN)/5, "TR "..tostring( round( TR[1]* M,0)).. " (+)" );             elseif  TR[1] < TR[2] then            core.host:execute ("drawLabel", 1, source:date(source:size()-1) + 3*size , MAX + 2*(MAX-MIN)/5, "TR "..tostring( round( TR[1]* M,0)) .." (-)" );             else            core.host:execute ("drawLabel", 1, source:date(source:size()-1) + 3*size , MAX + 2*(MAX-MIN)/5, "TR "..tostring( round( TR[1]* M,0)) .." (0)" );             end`

sabrumea

Posts: 34
Joined: Thu Aug 26, 2010 6:15 pm

Next