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

Program compiles, but doesn't display

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

    Program compiles, but doesn't display

    Greetings-

    So we've done the migration of an old program from NT 6.5 to NT 7 and got it to compile, however it will not display on the charts. We went through the code breaking changes for the migration and made the appropriate updates, yet nothing.

    This is a totally custom program written entirely from scratch and is roughly 1200 lines of code-- so don't ask me to upload LOL.

    Is there something basic we have missed? Seems to me like its just the flip of a switch or something, as the program doesn't appear to be engaging NT7 despite the changes made.

    Any thoughts?

    Thx.

    #2
    Hello hilojack,
    Thanks for your note.

    To assist you further may I know are you getting any error message in the Log tab or in the Output Window (Tools>Output Window).

    Please refer to this post which further discusses how to debug in NinjaTrader.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      hi joydeep-

      Thank you for your help. the error message in the log states:

      "Error on calling 'OnBarUpdate' method for indicator 'custom' on bar 0: Object reference not set to an instance of an object."

      Comment


        #4
        Hello hilojack,
        Thanks for the information.

        Unfortunately we do not debug custom NinjaScript codes. You have to debug the code and see from where the error is coming from.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Well I get that. Perhaps a little more than a 3 page migration guide would be helpful. there's a reason why people go platform agnostic... and unfortunately its situations like this.

          Comment


            #6
            Hello hilojack,
            Thanks for your feedback. I will forward your request to development for future consideration.
            JoydeepNinjaTrader Customer Service

            Comment


              #7
              Hello hilojack,
              You can also use the try catch block to fish out the errors. Please refer to this sample code which further demonstrates it.


              Please refer here for the code breaking changes that were made while one upgrades to NinjaTrader 7.
              JoydeepNinjaTrader Customer Service

              Comment


                #8
                Originally posted by hilojack View Post
                hi joydeep-

                Thank you for your help. the error message in the log states:

                "Error on calling 'OnBarUpdate' method for indicator 'custom' on bar 0: Object reference not set to an instance of an object."
                That means that you have declared an object but not initialized it before you are trying to access it. For example, have you initialized all the DataSeries (if any), that you have declared?

                Comment


                  #9
                  Originally posted by hilojack View Post
                  Greetings-

                  So we've done the migration of an old program from NT 6.5 to NT 7 and got it to compile, however it will not display on the charts. We went through the code breaking changes for the migration and made the appropriate updates, yet nothing.

                  This is a totally custom program written entirely from scratch and is roughly 1200 lines of code-- so don't ask me to upload LOL.

                  Is there something basic we have missed? Seems to me like its just the flip of a switch or something, as the program doesn't appear to be engaging NT7 despite the changes made.

                  Any thoughts?

                  Thx.
                  Hello, hilojack!
                  If it is possible then send me the code-i will try to help you

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by geotrades1, Today, 10:02 AM
                  1 response
                  4 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Started by ender_wiggum, Today, 09:50 AM
                  1 response
                  5 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by rajendrasubedi2023, Today, 09:50 AM
                  1 response
                  12 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Started by bmartz, Today, 09:30 AM
                  1 response
                  9 views
                  0 likes
                  Last Post NinjaTrader_Erick  
                  Started by geddyisodin, Today, 05:20 AM
                  3 responses
                  26 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Working...
                  X