Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Object reference not set to an instance of an object Error

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

    Object reference not set to an instance of an object Error

    Hi,

    I get the above error, but with a bar number, that isn't in the dataseries?!
    I have 1300 bars loaded and get the following error:

    #2
    Hello td_910,

    Thank you for your note.

    Are you running this indicator on more than one chart?

    Do you have any other workspaces open? Any workspace with a gray box next to its name in the Workspaces menu is open, but not currently visible. If you have any other open workspaces, is this applied to charts in any of them? If so, how many bars are loaded?

    Is this an indicator you created, or is it one you obtained from a 3rd party? Does the strategy use any added data series, to your knowledge?

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Hi Kate,

      nope, this os the only chart in the one open workspace I have.
      no added dataseries
      I can post the source, if you like.

      Comment


        #4
        here you go
        Attached Files

        Comment


          #5
          Hello td_910,

          Thank you for your reply.

          I don't see anything obvious in your code that would indicate why that particular bar was pointed out. So that I can try to reproduce as accurately as possible, what instrument and interval were you running this on when you received the error? If you right click your chart and select "Reload all historical data" do you receive the error again? How about if you right click and select "Reload NinjaScript"?

          Are you running into any issues with the display of the indicator? The error seems to have occurred in the same method where the Ask and Bid lines and text are drawn, so I would expect to have seen some error in those printing.

          Thanks in advance; I look forward to assisting you further.

          Comment


            #6
            E-mini current contract, 5 min chart
            it's one of those elusive errors, I guess
            reload NS or data doesn't reproduce it

            Comment


              #7
              Hello td_910,

              Thank you for your reply.

              I wasn't able to reproduce it either. I'd keep an eye out and let us know if it occurs again - otherwise, could have just been a hiccup on a bad tick.

              Please let us know if we may be of further assistance to you.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              603 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              349 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              104 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
              560 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X