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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        60 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X