in Search

Bug with MS 10.1 Average True Range

Last post 09-09-2009, 20:59 by mstt. 1 replies.
Sort Posts: Previous Next
  •  09-07-2009, 7:13 30620

    Bug with MS 10.1 Average True Range

    Hello,
     

    I am having difficulties getting a correct value of the Average True Range Indicator.  For example, the values for the last 3 days of Hang Seng Mini index are:

    Date         High Low Close

    2/Sep/2009 19503 19295 19425
    3/Sep/2009 19715 19442 19570
    4/Sep/2009 20430 19625 20379

     

    So, by the definition for Average True Range, it is calculated as a (1) maximum of the following for each day:

    Distance between a day's High & Low. So for each day above the values are:
    2/Sep/2009 208
    3/Sep/2009 273
    4/Sep/2009 805

    Distance between a day's High &yesterday's close

    2/Sep/2009 151
    3/Sep/2009 290
    4/Sep/2009 860

    Distance between a day's Low & yeseday's close

    2/Sep/2009 359
    3/Sep/2009 17
    4/Sep/2009 55


    (2) Then we add the maximum distances for each day and divide by the number of days.  In my example it is: (359+290+860)/3=503


    So, in my example I wanted to get the ATR over 3 days.  According to the calculation above, it is 503, however, accordign to my MS chart it is 522.

     

    Why is the MS ATR not functioning properly? Is it a bug?

     

    Rgds
    Damien

  •  09-09-2009, 20:59 30650 in reply to 30620

    Re: Bug with MS 10.1 Average True Range

    Damien

    I can't follow through your calculations on a chart as i don't have data for the Hang Seng, but I think the ATR IS calculating correctly. What you are not taking into account is that the internal smoothing used by ATR is Wilders - a form of exponential smoothing. An EMA uses fragments of ALL available past data, not just data from the last three bars. What might work better for you is to apply your own SMA smoothing to a single-bar True Range like this - Mov(ATR(1),3,S);

    Roy

View as RSS news feed in XML