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 charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          59 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          143 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          161 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          97 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          276 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X