Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

External DLL

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

    External DLL

    I am trying to use an external DLL by setting a reference in the NT editor and building. The build succeeds, zero errors. But then I get an error when I go to use a strategy that says, "Can't serialize StratX". A bunch of other errors come up and then when I even try and startup NT it crashes. It is the same code I had in the strategy. Even a simple and empty class, as soon as I do a "new" on it to instatiate it, it builds in the editor but then crashes NT. I have done this before on other platforms without issue. I also can include "using System.NET" and other windows external DLLs and they work fine.

    Is there a documented process for including your own external DLL?

    #2
    tradetree, for which .NET version was the custom dll build? So which target framework did you chose in other words? It would be important to only have 3.5 .NET or lower.

    After you've added the reference, was NT restarted so the DLL could be loaded up?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand,
      It was the .NET version! I was set for .NET 4.0 and I changed it to .NET 3.5. It is working perfectly after a great deal of hardship. I can't begin to tell you what I went through to get to this point. I was reinstalling .NET, NT etc. The other thing I found is that once you change the version you have to delete the old DLLs because it doesn't regenerate them as you might think. It thinks they are still current even though the .NET target has changed. Once I deleted them and rebuilt then it went to .NET 3.5 and worked like a charm.

      Originally posted by NinjaTrader_Bertrand View Post
      tradetree, for which .NET version was the custom dll build? So which target framework did you chose in other words? It would be important to only have 3.5 .NET or lower.

      After you've added the reference, was NT restarted so the DLL could be loaded up?

      Comment


        #4
        .NET Framework 4

        I am pleased tradetree got his external dll's working, but this brings up a good question to Ninjatrader:

        .NET Framework 4.0 was released a little over four (4) years ago. When should we start planning on Ninjatrader to begin using and supporting .NET Framework 4.0?

        This question has been posed before to Ninjatrader and deserves asking again. The reason being is that many of us have moved on and are using .NET Framework 4.0 and it is a reasonable inconvenience to insure backward compatibility with Ninjatrader.

        Are we waiting on NT8 to support .NET Framework 4.0?

        Thank you for your response.
        Last edited by number1; 03-18-2014, 01:51 PM.

        Comment


          #5
          Hello

          This is a good question !
          .Net 4.0 has a few changes that I need. With .NET 3.5 I have a lot more work. :-(

          b.r.

          NT_TradeEX

          Comment


            #6
            Thanks for the posts guys, the understanding is correct - the next major platform update will support up to .NET 4.5
            BertrandNinjaTrader Customer Service

            Comment


              #7
              NT 8 and .NET 4.5

              Excellent. That's going to be a great release.

              Thanks for the update.

              Comment


                #8
                Originally posted by NinjaTrader_Bertrand View Post
                Thanks for the posts guys, the understanding is correct - the next major platform update will support up to .NET 4.5
                This is great to know.... but this brings up the next question when will this happen...

                The next major Update seems to be comming for quite some time now. I can't understand why NT is not capable of telling at least a approximate timeframe when it will be released.

                I know that timing a release is always difficult to tell. I'm in the Computer and Development Business for over 20 Years and the kind how NT handles its release info is really not professional. Every professional Projectmanagement should at least have a schedule and timeplan how and when the release is about to be complete.

                Every OpenSource project can give a better estimation of their next release then NT. This is really frustating. Especially when you have a potential project in the pipeline that can not be started because you want/need to use features from .NET 4.5. or multicore/-thread Features.

                Sorry for the bashing...I'm just a little frustrated that I'm still stuck with NT7 and .NET3

                Comment


                  #9
                  I am having no success using an external DLL built targeting .Net 3.5. I am calling the functionality through a NinjaScript Indicator. It compiles fine within NinjaScript editor so definately sees the dll at compile time. When I add the indicator it comes up with an error:

                  Failed to call method 'Initialize' for indicator 'FlowCode': Could not load file or assembly 'NinjaCompanion, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.


                  I also posted this in detail but customer service is still working on it...

                  any pointers appreciated.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by rtwave, 04-12-2024, 09:30 AM
                  4 responses
                  31 views
                  0 likes
                  Last Post rtwave
                  by rtwave
                   
                  Started by yertle, Yesterday, 08:38 AM
                  7 responses
                  29 views
                  0 likes
                  Last Post yertle
                  by yertle
                   
                  Started by bmartz, 03-12-2024, 06:12 AM
                  2 responses
                  22 views
                  0 likes
                  Last Post bmartz
                  by bmartz
                   
                  Started by funk10101, Today, 12:02 AM
                  0 responses
                  7 views
                  0 likes
                  Last Post funk10101  
                  Started by gravdigaz6, Yesterday, 11:40 PM
                  1 response
                  9 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Working...
                  X