• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SessionIterator missing function

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

    SessionIterator missing function

    SessionIterator.GetNextSession(...) allows iteration of sessions forwards in time from an artbitrary DateTime. Since if you give it a DateTime in a session break, it gives you the following session.

    However as of RC2 there does not seem to be a method of iterating backwards in time from an arbitrary DateTime.

    I suggest a new function GetPreviousSession(...). If you give it a DateTime in a session break it would give you the previous session.

    #2
    Hello,

    Thank you for posting this.

    I have submitted this as a feature request to development.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello,

      I wanted to reply back on this item. While I have submitted this as a feature request, It was brought to my attention that the following could potentially work depending on how you plan to execute the logic.

      Code:
      sessionIterator.CalculateTradingDay(new DateTime(2016, 11, 15), true);
                                          
      DateTime tradingDay   = sessionIterator.ActualTradingDayExchange;
      DateTime beginTime       = sessionIterator.ActualSessionBegin;
      DateTime endTime     = sessionIterator.ActualSessionEnd;
      http://ninjatrader.com/support/helpG...lateTradingDay

      Output would be then like -

      Calculating trading day for Wednesday 16.11.2016 00:05:00
      The Prior Trading Day 15.11.2016 starts at 15.11.2016 00:00:00 and ends at 15.11.2016 23:00:00

      I look forward to being of further assistance.
      JesseNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by rickyblah12, Today, 09:17 PM
      0 responses
      1 view
      0 likes
      Last Post rickyblah12  
      Started by rickyblah12, Today, 08:27 PM
      0 responses
      3 views
      0 likes
      Last Post rickyblah12  
      Started by giogio1, Today, 06:55 PM
      0 responses
      3 views
      0 likes
      Last Post giogio1
      by giogio1
       
      Started by priceisking, Today, 06:39 PM
      0 responses
      2 views
      0 likes
      Last Post priceisking  
      Started by vivekniwas, Today, 05:59 PM
      0 responses
      1 view
      0 likes
      Last Post vivekniwas  
      Working...
      X