Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

FirstBarOfSession set to true on the settlement bar

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

    FirstBarOfSession set to true on the settlement bar

    Hi guys


    Can you tell me why Bars.FirstBarOfSession is true on the ES between 4:00PM and 4:15PM

    Is it a bug ?



    Thanks

    #2
    Hello,

    Thank you for your first forum post.

    What session template are you using?

    I was not able to duplicate this with the default session template. Please see the following output good when I ran this on a 1 minute chart.

    BARS TRUE 6/10/2010 7:31:00 AM
    BARS TRUE 6/11/2010 7:31:00 AM
    BARS TRUE 6/14/2010 7:31:00 AM

    Do you have strategy code that you can post that does this?

    I look forward to assisting you further.
    BrettNinjaTrader Product Management

    Comment


      #3
      Brett,

      I am using E-Mini SP Sep 2010 contract Session template : <Use instrument settings>

      When I run the following line of code :

      Print(Time[0]+" First Bar Of Session :"+Bars.FirstBarOfSession);

      I get :

      6/14/2010 4:05:00 PM First Bar Of Session : True

      as my Output window result

      Comment


        #4
        Hello,

        What version of NinjaTrader are you using. This can be found in the Control Center->Help->About to the right of the NinjaTrader logo.

        Also, is this output coming from running live or running backtest?

        I look forward to assisting you further.
        BrettNinjaTrader Product Management

        Comment


          #5
          Brett

          I am using NinjaTrader 7.0.0.17

          The problem is with Historical and real time data.

          Comment


            #6
            Hello,

            Here is what I get.

            6/11/2010 7:31:00 AM First Bar Of Session :True

            Can you please provide the strategy that you are running this on so that I may see if it is the strategy you are running that may be causing this. Have you changed the Session Template for the ES when you go to Tools->Instrument Manager and Edit the settings for the ES what is shown for Session Template?

            Also what time frame chart are you running this strategy on?

            I look forward to assisting you further.
            BrettNinjaTrader Product Management

            Comment


              #7
              Brett

              I am looking at a 1 minute Chart. So you should have bars showing between 4:00 and 4:15 PM.


              The problem is in between these bars

              Comment


                #8
                Hello,

                No issue on my side. Now I"m in MST so this is why the hours are 2 hours off.

                6/10/2010 2:00:00 PM First Bar Of Session :False
                6/10/2010 2:01:00 PM First Bar Of Session :False
                6/10/2010 2:02:00 PM First Bar Of Session :False
                6/10/2010 2:03:00 PM First Bar Of Session :False
                6/10/2010 2:04:00 PM First Bar Of Session :False
                6/10/2010 2:05:00 PM First Bar Of Session :False
                6/10/2010 2:06:00 PM First Bar Of Session :False
                6/10/2010 2:07:00 PM First Bar Of Session :False
                6/10/2010 2:08:00 PM First Bar Of Session :False
                6/10/2010 2:09:00 PM First Bar Of Session :False
                6/10/2010 2:10:00 PM First Bar Of Session :False
                6/10/2010 2:11:00 PM First Bar Of Session :False
                6/10/2010 2:12:00 PM First Bar Of Session :False
                6/10/2010 2:13:00 PM First Bar Of Session :False
                6/10/2010 2:14:00 PM First Bar Of Session :False
                6/10/2010 2:15:00 PM First Bar Of Session :False
                6/11/2010 7:31:00 AM First Bar Of Session :True

                So there is something different with how your running it. Can you please post your code file that your using so that I may check it. Also can you please let me know what Session template the ES is using that I mentioned in my previous forum post.

                Thank You.
                BrettNinjaTrader Product Management

                Comment


                  #9
                  Brett

                  There must be a misunderstanding.

                  The E Mini SP is trading between 9:30AM 4:15PM Eastern time.

                  When I use the Instrument settings on the session template for the ES 09-10 contract I automatically get a chart that starts at 9:30AM and ends at 4:15PM


                  Bernard

                  Comment


                    #10
                    OK

                    I understand the difference in time Zone.

                    I don't know why I get this bug

                    Comment


                      #11
                      Bernard,

                      Brett's output would correlate with your 9:30 to 4:15 timestamps. Mountain Time is two hours behind Eastern time so 7:30 = 9:30 and 2:15 = 4:15.

                      The first timestamp of the bar starting on 9:30 is 9:31 or the equivalent of 7:31 Mountain. Can you please attach a reference sample that you used that exhibits the behavior you described as we were unable to reproduce on our end with the simple base scenario of printing nothing but FirstBarOfSession.

                      Thank you.
                      Josh P.NinjaTrader Customer Service

                      Comment


                        #12
                        Bug confirmed

                        This is a bug and I had already communicated it. It still occurs regularly.
                        Attached Files

                        Comment


                          #13
                          Harry,

                          Can you please post a simple code segment so that I can attempt to duplicate this on my side as I am unable to duplicate this on the current NinjaTrader 7 beta 17 build.

                          I look forward to assisting you further.
                          BrettNinjaTrader Product Management

                          Comment


                            #14
                            Josh has taken care of this -> see other thread, I have just posted here, because there is evidence that somebody else has detected the same bug. I attach my indicator that I use to check for FirstBarOfSession, but obviously I do not want you to make two requests for the same problem.

                            You can only detect this with real-time data. So you need to connect a couple of hours prior to the close and then watch. If you reload historical data, there will be no problem.

                            It may will be that this problem only occurs with real-time data from Interactive Brokers, as it is not time-stamped.
                            Attached Files
                            Last edited by Harry; 06-17-2010, 02:56 PM.

                            Comment


                              #15
                              Hello,

                              If Josh is already looking into then there is no need to post elsewhere as I report directly to Josh on bugs. I will consider this case closed and you can follow up with him on the other thread Thank You.

                              Let me know if I can be of further assistance.
                              BrettNinjaTrader Product Management

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              606 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              353 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              105 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              560 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              561 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X