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?
        BertrandNinjaTrader Customer Service

        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 pechtri, 06-22-2023, 02:31 AM
            9 responses
            122 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by frankthearm, 04-18-2024, 09:08 AM
            16 responses
            66 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by habeebft, Today, 01:18 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by benmarkal, Today, 12:52 PM
            2 responses
            16 views
            0 likes
            Last Post benmarkal  
            Started by f.saeidi, Today, 01:38 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Working...
            X