Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IsFirstBarofSession

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

    #16
    Hello photog53,

    As a test, please take the following steps to force NinjaTrader to start without your saved workspace. You will have the option to reopen these after our tests.
    • Shut down NinjaTrader
    • Navigate to (My) Documents\NinjaTrader 8\workspaces
    • Cut and paste all the files within this folder onto your desktop
    • Restart NinjaTrader which should startup without any workspaces.
    • Once NinjaTrader has started on just the control center, please open a new chart with no custom bar types/indicators/templates and test for issue.


    If there are no issues on this new workspace, please try opening the previous workspace by exiting NinjaTrader and moving the files from your Desktop back into the 'workspaces' folder.
    Zachary G.NinjaTrader Customer Service

    Comment


      #17
      Thanks....(but I have already blown away NT8....including all registry entries and all files/folders)....and recreated from the ground up with beta 9. Previous experience indicates that some of these really weird problems (at least in earlier versions) sometimes went away if I killed everything and started over....

      While I have your attention I do have a question....in an earlier post you suggested "syncing my clock"....which at first made sense, but then got me wondering.

      Why would my PC clock being off.....(several seconds one way or the other)...impact "IsFirstBarof Session".
      I thought these records came in "timestamped down to the millisecond".
      Are you saying that NT8 uses my PC clock to determine "first bar of session" instead of the tick recorded timestamp???

      Comment


        #18
        Hello photog53,

        Depending on the data feed you are using, time stamps may be native or local. Looking back, it looks like you are utilizing NinjaTrader Continuum. As NinjaTrader Continuum provides native time stamps, syncing your PC clock should not be of concern in this case.

        For more information about the what is provided by each data feed, please take a look at this help guide link: http://ninjatrader.com/support/helpG...y_provider.htm

        Please, let us know if you are still able to reproduce this behavior again. If so, please provide the steps taken, and any settings that you may have changed, so I can attempt to reproduce.
        Zachary G.NinjaTrader Customer Service

        Comment


          #19
          Thanks....(that's what I thought, but after the suggestion on syncing, I thought I needed to double check)....

          Comment


            #20
            The problem occurred again.....(just when I thought it had gone away...
            I have attached two screengrabs and the code...

            Both examples use a custom "split session" Trading Hours.....(screen shot of TH template attached). Both examples were run against the same YM-03-16 Instrument with a 30-day lookback.....


            Ex:1 ChartBars is a (300)Second chart.....with a (60) Second 'secondary' DataSeries
            I am missing the BarsArray[0] "IsFirstBarof Session
            I find the BarsArray[1] "Is FirstBarofSession".


            Ex 2: ChartBars is a (450)Second Chart.... with a (60) Second 'secondary DataSeries
            I am missing the BarsArray[0] "IsFirstBarofSession"
            I am missing the BarsArray[1] "IsFirstBarofSession"

            In both examples....I get the FBOS for both sessions until we hit current day....

            Not sure what the heck is going on....this issue is sporadic and very difficult for me to pin down, but it never quite goes away.

            ----------------------------------------
            PHP Code:
            if (State == State.SetDefaults)
            {
                if (
            State == State.Configure)
                {
                    
            AddDataSeries(Instrument.FullNameData.BarsPeriodType.Second60,    Data.MarketDataType.Last);
                }
            }

            protected 
            override void OnBarUpdate()
            {
                if (
            BarsInProgress == 0)
                {
                    
            PrintTo PrintTo.OutputTab1;
                    if (
            CurrentBars[0] == 0)
                    {
                        Print (
            "BIP0  bar0 ="+Times[0][0].ToString() );
                        
            Draw.Text    (this,"BIP0Bar0"+CurrentBars[0], true"startBIP0"0Highs[0][0], 0Brushes.BlacklabelFontTextAlignment.LeftBrushes.TransparentBrushes.Gold100);     
                    }
                    else if (
            BarsArray[0].IsFirstBarOfSession)
                    {
                        Print (
            "BIP0 FBOS ="+Times[0][0].ToString() );
                        
            Draw.Text    (this,"BIP0FBOS"+CurrentBars[0], true"FBOS_0"0Highs[0][0], 0Brushes.BlacklabelFontTextAlignment.LeftBrushes.TransparentBrushes.Gold100);                         
                    }
                }    
                if (
            BarsInProgress == 1)
                {
                    
            PrintTo PrintTo.OutputTab2;
                    if (
            CurrentBars[1] == 0)
                    {
                        Print (
            "BIP1  bar0 ="+Times[1][0].ToString() );
                        
            //...'if' statement to stop error of printing before BarsArray[0] has a bar
                        
            if (CurrentBars[0] > 1)
                            
            Draw.Text    (this,"BIP1Bar1"+CurrentBars[0], true"startBIP1"0Lows[0][0], -60Brushes.BlacklabelFontTextAlignment.LeftBrushes.TransparentBrushes.Pink100);     
                    }
                    else if (
            BarsArray[1].IsFirstBarOfSession)
                    {
                        Print (
            "BIP1 FBOS ="+Times[1][0].ToString() );
                        
            //...'if' statement to stop error of printing before BarsArray[0] has a bar
                        
            if (CurrentBars[0] > 1)
                            
            Draw.Text    (this,"BIP1FBOS"+CurrentBars[0], true"FBOS_1"0Lows[0][0], -60Brushes.BlacklabelFontTextAlignment.LeftBrushes.TransparentBrushes.Pink100);                         
                    }
                }                

            Attached Files

            Comment


              #21
              Hello photog53,

              Please send me your log and trace files so that I may look into what occurred.

              You can do this by going to the Control Center-> Help-> Email Support.

              Please reference both my name and a link to this thread in the body of the email.
              Zachary G.NinjaTrader Customer Service

              Comment


                #22
                I emailed the log and trace files...(attn Zachary_G)

                Comment


                  #23
                  Zachary,
                  I may have managed to 'trap' the intermittent error. I set up a completely separate PC ...(my dev box has tons of crap)....that is 'clean' with only NT8 and minimal extra code. This morning I signed in to Ninja Contiuum....and everything looked OK. I fiddled around with charts and trading hours and indicators for a bit, taking notes as I went....eventually the issue popped up.

                  IF...I managed to save the data correctly and didn't undo something accidentally, this may help. I am swamped right now, but later today I will try to .zip the entire NT8 folder from Documents and send it to you.

                  The sequence of events seemed to be
                  - Starting a chart
                  - and then 'changing the time frame and trading hours template on the same chart.

                  The issue only seems to show up on "current session"....(all of the back session IsFirstBarofSession continue to show up correctly.
                  Also...it seems that if I leave my PC running and updating, eventually (perhaps when the problem is no longer the 'current' session, everything resolves....(which may be why I couldn't recreate 'yesterday's problem' again the following day)...

                  Who knows....(I just hope I managed to trap it and shut down in a way that preserves the issue..

                  Comment


                    #24
                    Hello photog53,

                    Thank you for the update.

                    I look forward to receiving the .zip.
                    Zachary G.NinjaTrader Customer Service

                    Comment


                      #25
                      Just wanted to check back on this issue. I think (hope) RC2 finally corrected it.
                      I stopped posting on the problem even though I continued to get it sporadically, because I couldn't seem to pinpoint the cause...
                      .....(the most recent problem was I got a "LastBarofSession, but not the next
                      FirstBarofSession... always on a custom TradingHours that had two sessions
                      2am-8:30am & 8:30am-electronicn market close. The error occurred on the
                      opening 2am bar.)

                      I finally just coded my own check and simply "printed" an error message to Output2...which I got fairly regularly.

                      Since RC2, I seem to no longer be getting the error.

                      Comment


                        #26
                        Thank you very much for following up with this photog53. We have closed the related ticket tracked by QA-1627. Please let us know if there are any other ways we can help.
                        Jessica P.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by carnitron, Today, 08:42 PM
                        0 responses
                        5 views
                        0 likes
                        Last Post carnitron  
                        Started by strategist007, Today, 07:51 PM
                        0 responses
                        6 views
                        0 likes
                        Last Post strategist007  
                        Started by StockTrader88, 03-06-2021, 08:58 AM
                        44 responses
                        3,973 views
                        3 likes
                        Last Post jhudas88  
                        Started by rbeckmann05, Today, 06:48 PM
                        0 responses
                        8 views
                        0 likes
                        Last Post rbeckmann05  
                        Started by rhyminkevin, Today, 04:58 PM
                        4 responses
                        58 views
                        0 likes
                        Last Post dp8282
                        by dp8282
                         
                        Working...
                        X