Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bug with SessionData.Length property

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

    Bug with SessionData.Length property

    The SessionData.Length property within NT7 R2 produces many unexpected results.

    To inspect print the variable in the OnStartUp()in a test strategy and backtest. Repeat backtest with alternate templates.

    Some of my results follow:

    1 Default 24/5 12Hrs but should be 24Hrs
    2 Default 24/7 12Hrs but should be 24Hrs
    3 CME US Index Futures RTH 28Hrs but should be 6.75Hrs
    4 CME US Index Futures ETH 24Hrs but should be 23.75Hrs
    5 CME Commodities RTH 19Hrs but should be 4Hrs
    6 CME Commodities ETH 19Hrs but should be 10.25Hrs
    7 CME FX Futures RTH 18Hrs but should be 6.7Hrs
    8 CME FX Futures ETH 18Hrs but should be 23Hrs

    Changing the users time zone should not change the results. (When tested it did not.)

    Can you replicate? I use the property to calculate the number of bars to load,

    Thanks.

    #2
    Hello,

    Thanks for the note.

    I'm trying to find SessionData.Length in the help guide not having any luck seeing that its a supported method. How did you find to use this property?

    I look forward to assisting you further.
    BrettNinjaTrader Product Management

    Comment


      #3
      SessionData.Length unreliable

      Originally posted by NinjaTrader_Brett View Post
      Hello,

      Thanks for the note.

      I'm trying to find SessionData.Length in the help guide not having any luck seeing that its a supported method. How did you find to use this property?

      I look forward to assisting you further.

      Hello Brett

      The variable may not hold mainstream interest, or be supported with help information, however it has script exposure, and can be accessed by typing " this. " into a strategy. Please send along to the programmers as a FYI. Unusual results probably due to session break or similiar
      Regards

      Comment


        #4
        Hello,

        I will forward. Thanks, however this is an unsupported method for use therefor you can expect non-expected results from it Unfortunately.

        I look forward to assisting you further.
        BrettNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

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