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

Run Time Error

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

    Run Time Error

    Hello.

    I'm getting the following message when I load my new indicator,

    "Failed to call method 'Initialize' for indicator 'rcsGomArrows': Object reference not set to an instance of an object."

    What am I missing?

    Thanks.

    #2
    Hi rcsingleton,

    Thank you for your post.

    This is a common programming error, that likely is a result from an error in the coding.
    What version of NinjaTrader are you using? (Control Center>Help>About)

    If you are not the creator of this indicator, please contact the creator so that they can resolve the issue by making the appropriate changes to the code.
    TimNinjaTrader Customer Service

    Comment


      #3
      I'm the creator of the indicator.

      I'm using NT 7.0.1000.2

      Comment


        #4
        Hi rcsingleton,

        The error indicates that something within the Initialize block is trying to reference something, but it does not exist or needs to be corrected. You'll need to narrow down which part of your code is causing the error, and make the necessary changes.

        You can try using Print()'s or even Try/Catch blocks:



        If you are still unable to identify section of the code, you can post it here and I will take a quick look myself.
        TimNinjaTrader Customer Service

        Comment


          #5
          I discovered the source of that message and its gone.

          The indicator is still not working and I see the following message under the "debug" version of the code in Visual Studio.

          A first chance exception of type 'System.IO.EndOfStreamException' occurred in mscorlib.dll.


          This is a DLL in both Silverlight and .NET framework.

          I have Silverlight 4.0.51204.0 and .NET Framework v4.0.

          Is there an issue with my current version of NT and the above two programs?

          Comment


            #6
            Hi rcsingleton,

            What version of NinjaTrader are you using?
            This does not look to be a NinjaTrader specific issues, you can try repairing the .Net framework, but for your indicator, you'll need to dig deeper for the cause. Have you been able to prompt any other error or specific behaviors when running the indicator?
            TimNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            4 views
            0 likes
            Last Post Javierw.ok  
            Started by timmbbo, Today, 08:59 AM
            2 responses
            10 views
            0 likes
            Last Post bltdavid  
            Started by alifarahani, Today, 09:40 AM
            6 responses
            40 views
            0 likes
            Last Post alifarahani  
            Started by Waxavi, Today, 02:10 AM
            1 response
            18 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Started by Kaledus, Today, 01:29 PM
            5 responses
            15 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X