Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

migrating Ninjatrader from Windows 7 to Windows 8

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

    migrating Ninjatrader from Windows 7 to Windows 8

    Hello. I developed a Ninjatrader strategy that runs without error on my old laptop running Windows 7. I just bought a new laptop running Windows 8. I installed the same version of Ninjatrader (7.0.1000.11) on the new laptop. The strategy compiles without error on the new computer. But when I try to run or backtest the strategy, it doesn't load, and I get the following error messge on the log tab:

    Unable to create instance of 'NinjaTrader.Strategy.MyStrategy1'. Most likely there is no default constructor defined, or the default constructor does not work correctly: Exception has been thrown by the target of an invocation.

    Since Ninjatrader installed both the 32-bit and 64-bit versions on my new laptop. I tried to run the strategy in both versions of Ninjatrader, and got the same error message.

    Any suggestions on what may be causing the error? Thanks for your help!

    #2
    Hi Tony, did you install this custom strategy as open code / cs file or as closed / protected assembly (DLL) format on the new laptop with Win8?

    Comment


      #3
      Hi Bertrand. Thanks for your reply. Initially I simply copied the whole "My Document/Ninjatrader 7" folder from my old laptop to my new laptop, because I wanted to migrate both my strategies and my data to the new computer. After reading your reply, I tried to import the strategy both as an open .cs file and as a DLL, but got the same error message.

      What's odd is that other custom strategies worked fine after the migration. The other strategies have simple code. The strategy that had problem is the most complicated one, with thousands of lines, lots of file I/Os, and using third party DLLs. I installed the thrid party DLLs in the new computer as well. As I said, the strategy compiled without error on the new computer. The error message appears when I try to run or backtest the strategy.

      I forgot to mention that my old laptop is 32-bit, but my new laptop is 64-bit. Not sure if that matters.

      Because the error message talks about "no default constructor is defined", I added the following blank constructor in the strategy, even though I don't see any default constructor in any other strategies. Still, it does not solve the problem.

      public MyStrategy1() : base()
      {
      }

      I would appreciate any help you can provide. Thanks.

      Comment


        #4
        Thanks Tony. We would need to isolate further to better understand - for the 3rd party Dll's do those all work well in the new environment as you would expect?

        Comment


          #5
          Thanks for your suggestion, Bertrand. I found that the problem was indeed caused by incompatibility of a third party DLL with Windows 8. Thank you for your help!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          647 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          369 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          108 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          572 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          573 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X