I'd like to see this also....
isn't it ATR indicator?
so if I wanted to see it for the last 50 days I would just look at the last bar's value for the ATR(50)?
Ycomp, what do you mean by daily range?
What do you mean by daily range? (High-Low)?
ATR is the average true range for the last n periods. The true range however, is not the High-Low for every day. True range is the maximum value of the following 3:
1.CurrentHigh-CurrentLow
2.Abs(PreviousClose-CurrentHigh)
3.Abs(PreviousClose-CurrentLow)
I hope you understand. Now, please tell me what exactly do you mean by the average daily range.
Bye.
#MTF_Average Range
I've attached #MTF_Average Range.mq4
It will give you the average range (high-low) for whatever period it is attached to. If you want the see the average range of a different timeframe, change the TimeFrame input to whatever timeframe you want. (1,5,15,30,60,240,1440,10080,43200)
The TimeFrame value must be greater than the current timeframe.
keris
BTW, unlike other MTF versions of custom indicators I've done, all the code is incorporated in this one file.
thanks keris I think this is what I was looking for... plus a bit more!
thanks for the explanation cucurucu.. now I understand better. I was just looking for High-Low.
What do you mean by daily range? (High-Low)?
ATR is the average true range for the last n periods. The true range however, is not the High-Low for every day. True range is the maximum value of the following 3:
1.CurrentHigh-CurrentLow
2.Abs(PreviousClose-CurrentHigh)
3.Abs(PreviousClose-CurrentLow)
I hope you understand. Now, please tell me what exactly do you mean by the average daily range.
Bye.script
Hi Nic,
Appreciate your work.
Here is a simple script to do what you are wanting.
I think there is 1 error in this script:
for (int i=0;i<=PeriodsBack;i++)
must be:
for (int i=0;i<PeriodsBack;i++)
In your example it will go 11 times through the for loop
Hi Nic,
Appreciate your work.
I think there is 1 error in this script:
for (int i=0;i<=PeriodsBack;i++)
must be:
for (int i=0;i<PeriodsBack;i++)
In your example it will go 11 times through the for loopThanks for the catch nohills. What i meant to do was:
for (int i=1;i<=PeriodsBack;i++)
I didn't want to take the current bar into calculation. Thanks!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
anyone have a script that will calculate the average daily range of a currency going back "n" days?
e.g. for 50 days