Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Days to load / ATR indicator

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

    Days to load / ATR indicator

    Hi,
    I am stil investigating how does counting of indicators work with ninjatrader.

    Here is where I get confused and what I cant get my head around:

    I want to get ATR(5) - I would assume, that it is enough to set "days to load" to 10.
    BUT
    I get different values for ATR(5) for different values of "days to load" - it is different when 20 , 40, 50 , 60, 80 or 100 days are loaded. It is the same once I load more than 100 days. Since it has direct impact on my strategy, I would like to undertand why.

    Thank you.

    #2
    Hello fLife,

    I believe the ATR functions as an IIR filter. Please see post #5 from Harry at the link below.


    The value of an infinite impulse response (IIR) filter depends on an infinite number of bars. An IIR filter has a recursive element in its formula. An example for a IIR filter is the EMA. Each value for the EMA is calculated as a weighted average of its previous value and the last closing price. Therefore an EMA(20) depends on all closing prices over the lookback value of the chart. In particular it also depends on the closing price 20 bars, 60 bars or 90 bars ago. However, a the dependance of an EMA(20) on the price 90 bars ago is pretty small. As a rule of thumb you may consider that an EMA(20) is accurate, if the lookback period of your chart exceeds the period of the EMA by a factor 3 to 4. You should be fine with 80 bars for an EMA(20).

    So the ATR is similar to the EMA - all bars are used in the ATR calculation. This causes different results when using a different amount of load back days.
    JasonNinjaTrader Customer Service

    Comment


      #3
      Thank you for your response. I will look further into this. Let me just ask this one silly question -
      For ATR(5) - which amount of loaded days is going to get me more accurate ATR result? 20 or 50 etc., then?
      I get the concept of IIR - but still I dont know the correct answer to a simple question - which setting will deliver more accurate results?

      Comment


        #4
        The more historical data you load, the more accurate the indicator will be.
        JasonNinjaTrader Customer Service

        Comment


          #5
          Originally posted by fLife View Post
          Thank you for your response. I will look further into this. Let me just ask this one silly question -
          For ATR(5) - which amount of loaded days is going to get me more accurate ATR result? 20 or 50 etc., then?
          I get the concept of IIR - but still I dont know the correct answer to a simple question - which setting will deliver more accurate results?
          The ATR, in practical trading terms can only be an integer multiple of the TickSize, as instrument price delta is always in Ticks. That points to an obvious way to determine accuracy: round the results of your calculation to TickSize before you compare them to determine if there is a real (in trading terms) difference. IOW, make comparisons only after massaging raw arithmetic results into logical trading data.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by bmartz, 03-12-2024, 06:12 AM
          4 responses
          31 views
          0 likes
          Last Post bmartz
          by bmartz
           
          Started by Aviram Y, Today, 05:29 AM
          4 responses
          12 views
          0 likes
          Last Post Aviram Y  
          Started by algospoke, 04-17-2024, 06:40 PM
          3 responses
          28 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by gentlebenthebear, Today, 01:30 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by cls71, Today, 04:45 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X