Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATR Calculation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ATR Calculation

    Hi

    Somehow I am stuck with understanding how the ATR is calculated. I understand the formula and the code, but somehow I get different results.
    I have this data: (Date, Open, High, Low, Close)
    15.10.2012 1428.75 1441.31 1427.24 1440.13 16.10.2012 1440.31 1455.51 1440.31 1454.92 17.10.2012 1454.22 1462.2 1453.35 1460.91 18.10.2012 1460.94 1464.02 1452.63 1457.34
    When I calculate ATR(1) with NT I get these values:
    15.10.2012: 14.07
    16.10.2012: 15.38
    17.10.2012: 8.85
    18.10.2012: 11.39
    They are correct.
    When I calcluate ATR(2) with NT I get these values:
    17.10.2012: 11.57
    18.10.2012: 11.48

    To my understanding this should be the average of 2 ATR. But it is not. The average would be 12.12 and 10.12

    thanks for your feedback
    Do I overlook something

    #2
    Hello Beauregard,
    The SMA is calculated as the (current value + last average value)/2. You can calculating it as current value + previous value)/2.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Joydeep View Post
      Hello Beauregard,
      The SMA is calculated as the (current value + last average value)/2. You can calculating it as current value + previous value)/2.
      Edited 17.11:
      Ok, I see what was misleading to me. The definition in the help section it is written that ATR is a moving average, which I assumed to be a simple moving average. In fact it is an exponential one
      Last edited by Beauregard; 11-17-2012, 08:57 AM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      580 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      335 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      102 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      552 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X