Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SessionBreak and NextBeginTime

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

    SessionBreak and NextBeginTime

    Bars. or BarsArray[0].SessionBreak returns "true" on all calls of OnBarUpdate() during the first bar of a session, not just the first call as defined in help. So it appears to be the same as Bars.FirstBarOfSession

    Also, using
    if (Bars.SessionBreak)
    Print(Time[
    0] + " NextBeginTime= " + Bars.Session.NextBeginTime);

    On the first tick it returns the start time of the previous session, then on subsequent ticks returns the start time of the current session.
    Therefore on historical bars, the first bar of a new session returns the start time of the previous session.
    Yet with one exception - on the first bar of the chart, it returns the start time for the next session based on real time, not the historical bar time.

    #2
    Your findings are accurate (same with NT6.5). That's why we will deprecate .SessionBreak with next update.

    Comment


      #3
      OK. If I don't use SessionBreak, then NextBeginTime returns the Date/Time of the current session start in real time - even on an historical bar 2 days ago it gives today's start Date/time.
      Could this be changed so that it returns the time relevant to the session that an historical bar is in?

      If that is not possible, then I think I have to use the SessionsOfDay array and find the relevant session myself.

      Comment


        #4
        There will be some improvements regarding the retrieval of session times with next update. Please stay tuned.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sofortune, 05-16-2024, 11:45 PM
        6 responses
        44 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Human#102, Today, 05:18 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by sdauteuil, 09-23-2021, 10:16 AM
        8 responses
        1,248 views
        0 likes
        Last Post NinjaTrader_RyanS  
        Started by KNalley, 01-24-2020, 10:33 AM
        6 responses
        954 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by JackyP, Today, 06:17 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_RyanS  
        Working...
        X