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.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by RubenCazorla, 08-30-2022, 06:36 AM
    3 responses
    77 views
    0 likes
    Last Post PaulMohn  
    Started by f.saeidi, Yesterday, 12:14 PM
    9 responses
    23 views
    0 likes
    Last Post f.saeidi  
    Started by Tim-c, Today, 03:54 AM
    0 responses
    3 views
    0 likes
    Last Post Tim-c
    by Tim-c
     
    Started by FrancisMorro, Today, 03:24 AM
    0 responses
    4 views
    0 likes
    Last Post FrancisMorro  
    Started by Segwin, 05-07-2018, 02:15 PM
    10 responses
    1,772 views
    0 likes
    Last Post Leafcutter  
    Working...
    X