Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GetNextBeginEnd()

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

    GetNextBeginEnd()

    I have a strategy and i want to add a session break to it. I want to trade us equities during RTH and I don't want the previous days bars to be used for the current days calculations (like 1 min bars) I know the code is Bars.Session.GetNextBeginEnd, or Bars.FirstBarOfSession but I don't know how to plug it in and have it work for the 9 30 to 4 00 session. I've seen similar posts but I just cant seem to properly implement it into the strategy.

    If i could get the code that would be great! (just started Ninjatrader)
    Thanks

    #2
    Welcome to our forums - you can unfortunately not set the session template to be used via the code. However from your post there's two approaches you could check into:

    a) if you want to use all data for the charting yet limit trading hours to RTH for example you could add a custom time filter into your conditions - http://www.ninjatrader.com/support/f...ead.php?t=3226

    b) if you want to limit the data used for the bars bulding itself, then just ensure to set a certain session template as you create the chart / series, for example use the US Equities RTH one that would mimic your desired hours.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    24 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    121 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    179 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    92 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    136 views
    0 likes
    Last Post cmoran13  
    Working...
    X