Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 Bars.IsFirstBarOfSession

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

    NT8 Bars.IsFirstBarOfSession

    Hello

    NT8.
    Reading Bars.IsFirstBarOfSession might throwing NullReference exeption in case historical data not loaded from data feed for the last bar. After I connected to data feed this error has gone.

    I read the property from OnMarketData() method.

    #2
    Hello,

    Thank you for the post.

    I wanted to get additional details on what is happening.

    When you say "in case historical data not loaded from data feed for the last bar" are you saying there is no historical data at all or just for 1 bar? Could you provide a more clear description of the requirement to test this?

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

    Comment


      #3
      I use 10 Range bars. And I had connection about 10-20 minutes before this issue. So some data definitely are at my side. In my mind some data not loaded at local machine only for last bar of chart and that causing this exception.

      Hope this helps.

      Comment


        #4
        Hello,

        Thank you for the reply.

        Could you send an image of the chart when this occurs? Based on the description I am not able to put together a way to test this on my end. If you are able to provide specific instruction on the process you followed to achieve the error that may be helpful as well.

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

        Comment


          #5
          You no need to check it by yourself. Just send my message to developers.
          Nevertheless if issue will happen again I'll do what you asked.

          Comment


            #6
            Hello,

            Thank you for the reply.

            Unfortunately I would need something more to provide to development to report anything. For any potential bug or abnormality we would need to be able to reproduce it in some fashion to further provide it as a bug or defect report.

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

            Comment


              #7
              As you like, but I saw this exception in Visual Studio during debug session and gave to u all the information I have.

              Comment


                #8
                Hello,

                Thank you for the reply.

                In visual studio you may see trapped errors in addition to actual unhandled errors, if you are not seeing this in the log , trace or in the output window or pop up error window in the platform it may be a trapped error. If you are able to identify in the platform a specific case I would like to review the error to see if it would be an actual error reported in the platform or bug.

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

                Comment


                  #9
                  It was in log window also as catched exception in OnMarketData(), as usually NT does it.

                  Comment


                    #10
                    Hello,

                    Thank you for the reply.

                    Yes in this case I would like to see the steps or code used during the error in order to reproduce it on our end. With that information I could further a report to development.

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

                    Comment


                      #11
                      Code:
                              [Browsable(false)]
                              [XmlIgnore]
                              public SessionIterator SessionIterator;
                      
                              protected override void OnStateChange()
                              {
                                  if (State == State.SetDefaults)
                                  {
                      // ...
                      }
                                  else if (State == State.DataLoaded)
                                  {
                                      SessionIterator = new SessionIterator(Bars);
                      }
                      }
                      
                      public override void OnMarketData(e)
                      {
                                  // Check session time
                                  if (!SessionIterator.IsInSession(e.Time, true, true))
                                      return;
                      
                           Print(Bars.IsFirstBarOfSession);
                      }
                      I suppose you need all data get loaded but first bar of new session. So you might setup custom session template and use 5M chart e.g. to speed up process of recreating of issue.

                      Comment


                        #12
                        Ren37,

                        I have encountered a very similar issue with IsFirstBarofSession....(see thread http://ninjatrader.com/support/forum...ad.php?t=82565) .....

                        In an attempt to debug and/or illustrate the problem, I coded a simple indicator that drew a text box on every 'first bar of session' for both the chartbars and one secondary dataseries. Over a period of time I had multiple charts showing a missing "IsFirstBarofSession" bool of true, but unfortunately Ninja support could never duplicate, and we can't fix what we can't find. Even on my charts, the issue would eventually go away, indicating that some data load/reload fixed the issue.

                        I finally decided that something unusual has to occur when refreshing or loading data on first startup in the morning. On my production PC which constantly loaded data I almost never had the issue. On the development box where I would sometimes have to load data for several days back...and or reload data after clearing DB cache in the NT folders, was the place I saw the error most often...(although even there it was intermittent).
                        I am sort of glad someone else is having a similar problem....if only to reassure me that I haven't gone nuts....

                        Comment


                          #13
                          photog53,

                          Your issue with FBOS still persists?

                          Comment


                            #14
                            Had it again yesterday......(but as usual it resolved itself away once I reloaded data at the end of the session)....whatever the issue is, it is not only intermittent in frequency of occurrence, it is also 'temporary' in that at some 'magic point' a data reload will make it go away. I say 'magic point' because I tried a reload during the morning and the problem remained...but eventually something triggers and a reload resolves the issue.
                            The problem of course is that while it is broken ...(short or long duration)... any code depending on it tends not to work like expected.
                            Last edited by photog53; 06-16-2016, 01:55 PM.

                            Comment


                              #15
                              It seems that NT8 is still under construction...
                              But I have no idea why the issue you reported in march not fixed yet.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by TradeForge, Today, 02:09 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post TradeForge  
                              Started by Waxavi, Today, 02:00 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post Waxavi
                              by Waxavi
                               
                              Started by elirion, Today, 01:36 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post elirion
                              by elirion
                               
                              Started by gentlebenthebear, Today, 01:30 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post gentlebenthebear  
                              Started by samish18, Yesterday, 08:31 AM
                              2 responses
                              9 views
                              0 likes
                              Last Post elirion
                              by elirion
                               
                              Working...
                              X