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 Balage0922, Today, 07:38 AM
            0 responses
            2 views
            0 likes
            Last Post Balage0922  
            Started by JoMoon2024, Today, 06:56 AM
            0 responses
            6 views
            0 likes
            Last Post JoMoon2024  
            Started by Haiasi, 04-25-2024, 06:53 PM
            2 responses
            19 views
            0 likes
            Last Post Massinisa  
            Started by Creamers, Today, 05:32 AM
            0 responses
            6 views
            0 likes
            Last Post Creamers  
            Started by Segwin, 05-07-2018, 02:15 PM
            12 responses
            1,786 views
            0 likes
            Last Post Leafcutter  
            Working...
            X