Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Number of bars over more than one session

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

    Number of bars over more than one session

    Hi everyone

    Bars.BarsSinceSession will give you the number of bars since the beginning of this session.

    Is there any way I can find the number of bars since the beginning of the previous session, or indeed the beginning of 'n sessions ago'?

    Much obliged in advance for any help.

    #2
    Hello arbuthnot,

    Thank you for your post.

    There is no direct function or method to call to pull the number of bars in the previous session. You can however use the GetNextBeginEnd to pull the beginning and ending of a session and use CurrentBar to store the value of the CurrentBar on Session Start and then subtract that from the CurrentBar at the Session End to have the number of bars per session.

    For information on GetNextBeginEnd please visit the following link: http://www.ninjatrader.com/support/h...xtbeginend.htm
    For information on CurrentBar please visit the following link: http://www.ninjatrader.com/support/h...currentbar.htm

    Comment


      #3
      Thanks very much, Patrick.

      It looks fairly complex but I'll try my best!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 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