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

Matlab NinjaTrader connection

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

    Matlab NinjaTrader connection

    Is there a way to connect ninjatrader with matlab via COM? I saw different examples in the net but I could not implement any communication. Please help me.
    Thank you in advance.
    Best regards
    Benjamin

    #2
    Hi Benjamin,

    Unfortunately there is no support for this but it may be possible. Hopefully the following links can help you out find what others have done in this area.


    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thank you RyanM but maybe there is anybody else. I tried the following example from the matlab page:
      using System;
      namespace ConsoleApplication4
      {
      class Class1
      {
      [STAThread] static void Main(string[] args)
      {
      MLApp.MLApp matlab = new MLApp.MLApp();

      System.Array pr = new double[4];
      pr.SetValue(11,0);
      pr.SetValue(12,1);
      pr.SetValue(13,2);
      pr.SetValue(14,3);

      System.Array pi = new double[4];
      pi.SetValue(1,0);
      pi.SetValue(2,1);
      pi.SetValue(3,2);
      pi.SetValue(4,3);

      matlab.PutFullMatrix("a", "base", pr, pi);

      System.Array prresult = new double[4];
      System.Array piresult = new double[4];
      matlab.GetFullMatrix("a", "base", ref prresult, ref piresult);
      }
      }
      }
      In C# it works fine. But in Ninjatrader I don´t know how to handle that.
      Please help me.
      Thank you in advance
      Benjamin
      Last edited by bascher; 06-12-2011, 03:02 AM.

      Comment


        #4
        Benjamin, as Ryan mentioned, connecting Matlab to NinjaTrader is not supported.
        AustinNinjaTrader Customer Service

        Comment


          #5
          Hi,

          I am not trying to use com but I am struggling to make NT work with .net assemblies produced by the Matlab NE builder. 'Apparently' it is the easy approach according to some posts i have seen but i can't actually find any detail. You may find more on the problem you are facing at Big Mikes forum, I saw a post about implementing a com call to matlab on that site.

          Comment


            #6
            If you're 'producing' assemblies to be loaded with NT please ensure they would actually be .NET 3.5 ones and not 4.0
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Hi Bertrand,

              Yes they are targeted to 3.5. I know that you don't give support on this but any hints would help. I have a custom dll let's say 'mydotnet.dll' and a bunch of wrapper code 'mydotnet.cs' I figured putting them in the bin/custom folder and refer to the wrapper code should work with the appropriate using directives and references? Am I missing something obvious? Even the vaguest of clues would be much appreciated...

              Regards
              Last edited by sjmuk; 06-13-2011, 07:04 AM. Reason: mistakes

              Comment


                #8
                Ok got the assembly working now.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by andrewtrades, Today, 04:57 PM
                1 response
                4 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by chbruno, Today, 04:10 PM
                0 responses
                3 views
                0 likes
                Last Post chbruno
                by chbruno
                 
                Started by josh18955, 03-25-2023, 11:16 AM
                6 responses
                436 views
                0 likes
                Last Post Delerium  
                Started by FAQtrader, Today, 03:35 PM
                0 responses
                6 views
                0 likes
                Last Post FAQtrader  
                Started by rocketman7, Today, 09:41 AM
                5 responses
                19 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X