Announcement

Collapse
No announcement yet.

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

            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 Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                637 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                366 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                107 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                569 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                571 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X