Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy could not be deserialized

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

    Strategy could not be deserialized

    Hi,

    I recently upgraded to the latest version of NT 7. I just went to test some strategy modifications by copying my old strategy, renaming it, and changing the public class. It compiled fine. When I went to open a strategy analyzer window, I got the following error:

    Strategy 'NinjaTrader.Strategy.MyStrategyDev' could not be deserialized: Object reference not set to an instance of an object.

    Is there something else I need to do?

    Thanks,

    Rich

    #2
    Hello Rich,

    Thank you for your post.

    Can you please post the Properties section of your code? I will need to review this to see if I can duplicate the error.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Just this part?

      #region Properties
      [Description("")]
      [GridCategory("Parameters")]
      public int Qty
      {
      get { return qty; }
      set { qty = Math.Max(1, value); }
      }
      #endregion

      Comment


        #4
        Thanks Rich, that part should not give you any issues - have you created parameter templates for this strategy? Has this only occured when working in the SA?

        Comment


          #5
          Like I said, I made a file copy of the production version of my strategy. Then I changed the strategy name in the code. It compiles fine, and I seem to only get that error in SA. The strategy still backtests fine in SA though.

          Comment


            #6
            richp6,

            Without seeing complete code we cannot comment on what might have been missed or not in the renaming process. In the future I suggest you just right click > Save As if you want to create a copy with a different name. This will ensure all necessary changes are propagated through automatically.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            61 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            40 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            21 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            23 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            51 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X