Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Session Start and End

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

    Session Start and End

    Hello,


    I am using Session GetNextBeginEnd method to get Session Start and End. Code looks like this:

    if (Bars.FirstBarOfSession)
    {
    iSessionID++;
    Bars.Session.GetNextBeginEnd(BarsArray[0], 0, out m_SessionBegin, out m_SessionEnd);
    Print("Session number " + iSessionID + ". From " + m_SessionBegin + " to " + m_SessionEnd);
    }
    I am getting very odds results. Using RP 12-12 instrument:
    Session number 1. From 28/09/2012 0:00:00 to 28/09/2012 20:55:00
    Session number 2. From 01/10/2012 16:00:00 to 01/10/2012 23:00:00
    Session number 3. From 02/10/2012 0:00:00 to 02/10/2012 23:00:00

    Only Session 3 output is as expected (according to the session template). It is even stranger, because in Historical Data Manager ->Edit, bit data, I can see full data for session 2 (From 0:00 to 23:00), but the methods says that it starts at 16:00.

    Is this behavior normal?

    Regards

    #2
    jbesada, which session template are you working with for your instrument? What outcome would you see if you worked with the time-stamp based signature offered as well?

    Comment


      #3
      The session template is CME Forest Futures ETH. As previously commented, the right session values on my local time are between 00:00 and 23:00.
      I think the problem is related to the know issue of NT of closing bars with last timestamp only.
      With an easy check, you can see this problem.
      Configure a chart with RP 12-12, one minute and bid data; see output with this toy code
      if (Historical)
      {
      Print("Historical: " + BarsInProgress + " - " + DateTime.Now + " / " + Time[0] + " " + Close[0]);
      }

      Historical: 0 - 02/10/2012 13:56:04 / 28/09/2012 20:53:00 0,79695
      Historical: 0 - 02/10/2012 13:56:04 / 28/09/2012 20:54:00 0,797
      Historical: 0 - 02/10/2012 13:56:04 / 28/09/2012 20:55:00 0,797
      Historical: 0 - 02/10/2012 13:56:04 / 01/10/2012 16:01:00 0,80095
      Historical: 0 - 02/10/2012 13:56:04 / 01/10/2012 16:02:00 0,80085
      Historical: 0 - 02/10/2012 13:56:04 / 01/10/2012 16:03:00 0,8009
      First data of 01/10/2012 is at 16:01 but that is wrong, please see in attached figure that there are previous data.
      I really need get true Bid data of a previous day, is there any way to work around this issue?

      Regards
      Attached Files

      Comment


        #4
        Looked into, same if you change to the CME FX Futures ETH template here? That would provide the correct hours for this instrument ranging from 5PM to 4PM Central US time.

        Comment


          #5
          Your are right, it was bad configured. Thank you!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          651 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          370 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          574 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          577 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X