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 DavidHP, Today, 07:56 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by kujista, Today, 06:23 AM
            3 responses
            6 views
            0 likes
            Last Post kujista
            by kujista
             
            Started by Mindset, Yesterday, 02:04 AM
            2 responses
            17 views
            0 likes
            Last Post NinjaTrader_RyanS  
            Started by f.saeidi, Today, 08:03 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by samish18, 04-17-2024, 08:57 AM
            15 responses
            52 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Working...
            X