Hello,
the ATR uses Wilders smoothing while you used simple smoothing. Here is the
code that matches the build-in calculation.
TrueRange = Max( H - L, Max( abs( H - Ref( C, -1 ) ), abs( L - Ref( C, -1 )
) ) );
myATR = Wilders(TrueRange, 3);
Plot(myATR, "myATR", colorBlue, 1);
Thomas
www.PatternExplorer.com