You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi, I always had the idea that iATR(NULL, NULL, 1, i) was the same as (High[i] - Low[i]). Both are suppose to calculate the range of the i'th bar. However I found this is not the case and I'm getting strange data showing up. I'm using the following code
The indicator above is displaying actual differences between the two ATR calculations. When I look at the D1 timeframe, the indicator is displaying a single spike every so often as illustrated below.
My original intent was to calculate the 5 day ATR via iATR(NULL, PERIOD_D1, 5, i). I compared this to ((High[i] -Low[i]) + (High[i+1] -Low[i+1]) + (High[i+2] -Low[i+2]) + (High[i+3] -Low[i+3]) + (High[i+4] -Low[i+4]))/5 and noticed slight differences between the calculations.
Would anyone know why a difference is showing?
Any help most appreciated
Cheers,
Mag1kus