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 PaulMohn, Today, 12:36 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by yertle, Yesterday, 08:38 AM
    8 responses
    36 views
    0 likes
    Last Post ryjoga
    by ryjoga
     
    Started by rdtdale, Today, 01:02 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by alifarahani, Today, 09:40 AM
    3 responses
    16 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by RookieTrader, Today, 09:37 AM
    4 responses
    19 views
    0 likes
    Last Post RookieTrader  
    Working...
    X