Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.

    Kate W.NinjaTrader Customer Service

    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.
          Kate W.NinjaTrader Customer Service

          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.
              Kate W.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Christopher_R, Today, 12:29 AM
              0 responses
              9 views
              0 likes
              Last Post Christopher_R  
              Started by sidlercom80, 10-28-2023, 08:49 AM
              166 responses
              2,235 views
              0 likes
              Last Post sidlercom80  
              Started by thread, Yesterday, 11:58 PM
              0 responses
              3 views
              0 likes
              Last Post thread
              by thread
               
              Started by jclose, Yesterday, 09:37 PM
              0 responses
              8 views
              0 likes
              Last Post jclose
              by jclose
               
              Started by WeyldFalcon, 08-07-2020, 06:13 AM
              10 responses
              1,415 views
              0 likes
              Last Post Traderontheroad  
              Working...
              X