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

Cannot save Template: 'Object reference not set to an instance of an object'

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

    Cannot save Template: 'Object reference not set to an instance of an object'

    Hey guys,

    Just installed 16.0 and when I try to save a Default Template in Strategy Analyzer for the first time, I see this error:

    Time Category Message
    10/16/2018 4:58:17 PM Default Unhandled exception: Object reference not set to an instance of an object.

    I've attached a very simple script so you can see the problem. So, just add it as a new script, compile, go to Strat Analyzer and Template | Save, Default and hit Save.

    #2
    Attached script
    Attached Files

    Comment


      #3
      Hello PN720,

      Thanks for your post.

      I have not generated any error following your steps and using your test script. I repeated several times. You did not specify any instrument or time frame so I tested on NQ 12-18, 1-minute bars from Jan 1, 2018 to Oct 16, 2018. Can you test once more (and ensure you have specific instrument and time frames data)?

      If you still hit the error, please send your log and trace files to PlatformSupport[at]NinjaTrader[dot]Com and mark the e-mail Atten:Paul and please include a link to this thread for reference.


      Paul H.NinjaTrader Customer Service

      Comment


        #4
        Hey guys,
        I was still seeing the error this morning and also noticed that my NJT was taking forever to load the Workspaces so I went ahead and did a complete wipe and reinstall. This seems to have fixed the issue so I'll just go forward with this blank install from now on.
        Thanks for your quick response.

        Comment


          #5
          Hey guys,
          I did some more testing and it looks like the error only occurs for a new script that you haven't Run yet with results. So, if you create a new script, compile and go straight to Template | Save as Default OK, without having run the strategy first, the error will appear. If you run the strategy and then go to Template | Save and default OK, the error doesn't happen.

          Comment


            #6
            Hello PN720,

            Thanks for your reply.

            I have received your e-mail with the log and trace files, thank-you.

            I have not been able to replicate your latest condition error observation.

            I will be in touch with you through e-mail as I have further questions.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Hello Traders,

              i had a similar issue with templates in the strategy analyzer. Just received the same error message on saving my parameters to a template. On loading an existing template nothing happend.

              I figured out that my strategy has a public proberty with the attribute [Browsable(false)] but not [XmlIgnore]. After adding this attribute all works fine. Maybe the template tries to read/write the variable which is not accessible by the strategy analyzer.

              Thought that info might help someone with same problems.

              Kind regards
              Timo

              Comment


                #8
                FYI.. NJT said it's fixed in the next version:

                Comment


                  #9
                  Hello Adoran,

                  Thanks for your post and welcome to the NinjaTrader forums.

                  We appreciate your contribution.
                  Paul H.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Christopher_R, Today, 12:29 AM
                  0 responses
                  6 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
                  7 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