Announcement

Collapse
No announcement yet.

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.


      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.

            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.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, Today, 05:17 AM
                  0 responses
                  43 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  124 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  65 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  42 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  46 views
                  0 likes
                  Last Post TheRealMorford  
                  Working...
                  X