Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Major DLL problem, need help please :)

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

    Major DLL problem, need help please :)

    The program I use, can only Load the Library if a Header .h file which contains the exported functions is also accompanied.
    How do I make that for the NtDirect.dll?

    thanks

    #2
    Unfortunately this is beyond what we provide support for.

    Hint: You'll need to load the library by LoadLibrary and take it from there. Please consult the Microsoft documentation for how to load and access a DLL "dynamically".

    Comment


      #3
      Thank you Dierk,
      Do you know if this is a managed or a COM object or if it's unmanaged?

      paying ahead, here's a list of the Functions(still missing the prototypes though(working on it)):
      Ask
      AskPlayback
      AvgEntryPrice
      AvgFillPrice
      Bid
      BidPlayback
      BuyingPower
      CashValue
      Command
      ConfirmOrders
      Connected
      Filled
      Last
      LastPlayback
      MarketData
      MarketPosition
      NewOrderId
      OrderStatus
      Orders
      QueryInstrument
      RealizedPnL
      SetAllocReturnString
      SetMaxReturnStringLength
      SetUp
      StopOrders
      Strategies
      StrategyPosition
      SubscribeMarketData
      TargetOrders
      TearDown
      UnsubscribeMarketData

      Comment


        #4
        This is a unmanaged DLL.

        Comment


          #5
          sorry was a repeat of the above.

          Comment


            #6
            Again thanks, it's as I had anticipated.

            Here's the problem and it is NOT a programming one, I want to use MATLAB in conjunction with Ninja Trader for Automation purposes.
            Matlab, only handles unmanaged DLL's but must have the .h file too.
            I could probably hack my way into building this .h file for the NtDirect.dll but it would take the NT engineers like 2 minutes of their time Vs. my several days!
            Now, since this is totally a favorable innovation for NT which would help bring onboard MATLAB too and it DOES NOT by any ways or means jeopardize the NT interest and to the contrary it should be of utmost interest to them to expand their utilization and grow the customer base, I'd like to request if NT could invest 2 minutes and publish the .h file of interest and add many happy customers to their base?
            thanks again


            Originally posted by NinjaTrader_Dierk View Post
            This is a unmanaged DLL.

            Comment


              #7
              >> Matlab, only handles unmanaged DLL's but must have the .h file too.
              Unfortuantely this is not supported.

              Comment


                #8
                NtDirect.dll header file

                Did you ever get a header file for NtDirect.dll? I also want to interface Matlab with NinjaTrader.

                Comment


                  #9
                  MATLAB call to NtDirect.dll

                  Using MATLAB's NET.addAssembly instruction on NtDirect.dll:

                  results in the MATLAB error message:

                  "Could not load file or assembly. The module was expected to contain an assembly manifest."

                  Any idea why?

                  Comment


                    #10
                    Hello KChuck,

                    I am not familiar with MATLAB, but are you using or compiling any .NET files that use .NET 4 or above?
                    JCNinjaTrader Customer Service

                    Comment


                      #11
                      My MATLAB system is configured (using mex) to use the MS Studio 2010 compiler (.NET version 4).

                      Comment


                        #12
                        Hello KChuck,

                        NinjaTrader 7 only supports up to .NET 3.5, can you try to change to 3.5 and try this again.
                        JCNinjaTrader Customer Service

                        Comment


                          #13
                          JC,

                          Thanks, I will find an older MS Studio compiler and mex MATLAB to it.
                          I will post my results and hopefully successfully play MATLAB througn NtDirect.dll.

                          Any chance that Ninjatrader will release an NtDirect.dll that is compiled with MS Visual Studio 2010? That would be useful not only for MATLAB users, but the whole C# community that use the 2010 MS Visual Studio tools and associated .dll tools.

                          Comment


                            #14
                            Hello KChuck,

                            In NinjaTrader 7 this is most likely not going to change, but there are different ways of accessing it to be able to use it inside of Visual Studios that you can use it is just not supported is all.

                            Here are two good thread that you may view.


                            JCNinjaTrader Customer Service

                            Comment


                              #15
                              The NtDirect.dll uses old style 32 bit C format. I have written my own .h file and Matlab does see the library using the loadlibrary command. However, at run time on Windows7, Matlab crashes. Reading through the crash report, it is clear that a 64 bit .dll from Ninjatrader was called and caused the crash. It would appear that there are two possible solutions:
                              1. Get a copy of Windows XP and use that OS along with a 32 bit version of Matlab. This should play fine with a 32 bit version of NT. This is like turning the clock back 5 to 10 years.
                              2. Beg and plead with Ninjatrader to compile a modern 64 bit version of NtDirect.dll that puts them in this decade of software development. Let's face it, 64 bits is here to stay and there should be no avoiding it! Please give us a 64 bit gateway to accessing Ninjatrader!

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by argusthome, 03-08-2026, 10:06 AM
                              0 responses
                              68 views
                              0 likes
                              Last Post argusthome  
                              Started by NabilKhattabi, 03-06-2026, 11:18 AM
                              0 responses
                              41 views
                              0 likes
                              Last Post NabilKhattabi  
                              Started by Deep42, 03-06-2026, 12:28 AM
                              0 responses
                              24 views
                              0 likes
                              Last Post Deep42
                              by Deep42
                               
                              Started by TheRealMorford, 03-05-2026, 06:15 PM
                              0 responses
                              27 views
                              0 likes
                              Last Post TheRealMorford  
                              Started by Mindset, 02-28-2026, 06:16 AM
                              0 responses
                              54 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Working...
                              X