This is a TradingView re-write from Trader Dante's dATR indicator.
I have an observation / question for your consideration please. If I take a 20 day ATR from the the day before's candle, and then deduct that ATR from today's high, I am not getting the same reading as this indicator. I have done several manual checks and it's always a few pips out.
My maths on the manual calculations I am doing:
Yesterday’s 20 day period ATR deducted from the current days high = lower ATR
Yesterday’s 20 day period ATR added to current days low = upper ATR
it's only a few pips, but I'm scratching my head to see where I am going wrong. If you wouldn't mind taking a moment to check my logic please I would be most grateful.