Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATR like TOS ATR

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

    ATR like TOS ATR

    Having migrated to Ninjatrader from TOS I am having a discrepancy in data when I compare the ATR.

    In TOS I am using ATR(5 day, simple). Investigating it seems that the OHLC values I get in TOS are different than the ones in Ninja.

    This is for /ES. Issue looks to be related to session template.
    In the indicator I also want the session Open and Close values.

    I can not see how to reference two different session templates from within an indicator/strategy.

    Alternatively I can program a new ATR indicator, but I need to extract the overnight High and Low for use in the ATR calc paired with the Session Close.

    When I use

    if ( (Bars.BarsSinceSession == 0 ) && (Time[0].ToString("ddd") != "Sun" ) )
    {
    Print("");
    Print(Time[0] + " " + Time[0].ToString("ddd"));
    Print("Open: " + Open[0]);
    Print("PrvDayClose: " + Bars.GetDayBar(1).Close);
    Print("PrvDayHigh: " + Bars.GetDayBar(1).High);
    Print("PrvDayLow: " + Bars.GetDayBar(1).Low);
    }

    I am able to capture the Session Open, and PrvDayClose correctly with the code above.
    The Prv Day High and Low though are the regular session High and Low and I want the overnight H/L if they are larger/smaller respectively.

    I tried Add("ES 09-16", PeriodType.Day, 1); // Add Day Bars for ATR calc
    But ATR on this also does not match TOS. Can I pass a 24h session template to the alternate time period?

    Any thoughts or suggestions?

    #2
    Hello EricC64,

    Thanks for your post and welcome to the forums!

    What datafeed are you connected to NinjaTrader7 with?

    Comment


      #3
      Data Feed

      I am testing using the Sim101 account and the NinjaTrader live feed. We have the Continuum Data feed I think.

      For Example in TOS I see the following ATRs over last couple of days
      Date TOS Ninja
      8/23 11.95 10.6 (Candle shows 8/24 and 8/23 candle missing. I see an 8/25 candle
      8/22 11.70 10.81
      8/19 11.55 11.02

      Chart looks to be using the 24/7 default session.
      Strategy is using US Index Emini Futures RTH/ETH

      Comment


        #4
        Hello EricC64,

        Thanks for your reply.

        In the case of the NinjaTrader continuum data feed, in Ninjatrader7, a daily bar is preconfigured as RTH and session templates cannot change that.

        A work around would be to replace the daily bar with a 1440 minute bar which will then be effected by the session template.

        Comment

        Latest Posts

        Collapse

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