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 sjsj2732, Yesterday, 04:31 AM
        0 responses
        22 views
        0 likes
        Last Post sjsj2732  
        Started by NullPointStrategies, 03-13-2026, 05:17 AM
        0 responses
        281 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        279 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        130 views
        1 like
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        90 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Working...
        X