Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding a 14Day ATR to 5minute Chart

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

    Adding a 14Day ATR to 5minute Chart

    Hi,

    I cant figure out how to add a 14day ATR to a 5minute chart. I can add a 14bar ATR on a 5minute chart but not a 14day ATR.

    Any help would be much appreciated.

    Thanks

    Mike

    #2
    Mike, you would need to first add a daily series as well to the chart - then you could point to this series as input series for your ATR indicator -

    http://www.ninjatrader.com/support/h...indicators.htm (Indicator input series)

    Thanks,

    Comment


      #3
      Thanks Bertrand,

      I have seen this line of code on the forum but it makes no sense to me:

      Daily_Trend = new DataSeries(this);

      I presume to add a Daily dataseries I will have to replace the 'this' with Daily or Day or something as I assume 'this' refers to the current dataseries of the chart (ie 5minute in my case).

      This is what I am trying to do:
      Add(ATR(PeriodType.Day, atrPeriod));
      ie add the 14day atr on the 5min chart.

      Thanks

      Mike

      Comment


        #4
        Mike, to do this via NinjaScript you would need to Add() your daily period type first to the indicator and then calculate your ATR on it as second step:



        For the first added series, you could for example point to BarsArray[1] then as input series for your ATR indicator: ATR(BarsArray[1], 14)[0];

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        646 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        367 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        107 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        569 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X