Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

.NET ATI Error

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

    .NET ATI Error

    I am using .NET ATI to communicate with NinjaTrader. I used the Sample C# application from the support. I see that if the sample application runs on the same machine as NinjaTrader, the ATI connection works (host=localhost, port=36973).

    On the other hand, if I connect from another machine, using the IP number of the machine which has NinjaTrader, I get the error

    "Unable to connect to NinjaTrader (192.168.1.38/36973). Please make sure NinjaTrader is running: object reference not set to an instance of an object"

    Note that the Firewall is disabled on NinjaTrader machine, and the AT interface Check is set (green light on the lower right corner of NT Control Center).

    Thanks

    #2
    Since it's working as you run it on the same machine it must be related to the setup of the client or the target machine. Unfortunately we are no experts in Windows configuration. You may consult with your admin to make sure both machines could communicate properly.

    Comment


      #3
      Originally posted by mdm72 View Post
      I am using .NET ATI to communicate with NinjaTrader. I used the Sample C# application from the support. I see that if the sample application runs on the same machine as NinjaTrader, the ATI connection works (host=localhost, port=36973).

      On the other hand, if I connect from another machine, using the IP number of the machine which has NinjaTrader, I get the error

      "Unable to connect to NinjaTrader (192.168.1.38/36973). Please make sure NinjaTrader is running: object reference not set to an instance of an object"

      Note that the Firewall is disabled on NinjaTrader machine, and the AT interface Check is set (green light on the lower right corner of NT Control Center).

      Thanks
      Have you checked your firewall settings? Make sure it does not block Port 36973

      Comment


        #4
        any update on this?
        I have the same issue.
        I can telnet into the port 36973 on both machines

        Comment


          #5
          Have you tried the same setup on Static IP's in your LAN?
          BertrandNinjaTrader Customer Service

          Comment


            #6
            I have the same issue, and the ip's are fixed.

            Comment


              #7
              Unfortunately we just aren't network experts to be qualified to help you with the network setup. Please try consulting your network administrator.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Hi mdm. try having ninja running on both computers.
                the docs dont state this, but I believe its need for one tradestation to talk across an external ip, for it to work.
                This helped my issues but didnt resolve it.


                the tradestation code below needs ninja on both computer
                DefineDLLFunc: "NtDirect.dll", int, "SetUp", lpstr, int;
                if CurrentBar = 1 then begin
                SetUp("123.123.123.123", 36973);// where 123.... is the ip address
                end;

                Comment


                  #9
                  has anyone got this tradestation code running on external ip?
                  even with firewalls off on both comuters, it doesnt go.

                  DefineDLLFunc: "NtDirect.dll", int, "SetUp", lpstr, int;
                  if CurrentBar = 1 then begin
                  SetUp("74.63.69.123", 36973);
                  end;

                  error given is unable to connect to ninjatrader (ip)/36973 please make sure Ninjatrader is running: Object reference not set to an instance of an object
                  Attached Files

                  Comment


                    #10
                    hi mdm.
                    can you disable firewalls on both machines as a test.
                    can you also telnet in your ip
                    ie telnet xx.xx.xx.xx. 36973
                    you should see a lot of gibberish sent from ninja.
                    in your case xx.xx.xx.xx is 192.168.1.38

                    netstat -a might give you some clues, but im out of my depth here.
                    what o/s are you on.
                    is xp or 2003 server or vista

                    Comment


                      #11
                      hi mdm72.
                      I have some guess's to our problems.
                      are the machines running the same version of .net?
                      I am told there are lots of issues with multiple versions of .net on o/s
                      what os are you running?
                      I ran system internals tcpview

                      with no data feed connected, it just shows nt listing on port 36973.
                      The fact that I can telnet across the machines on 36973 makes me think this is not a firewall issue. If you google "Object reference not set to an instance of an object" there is lots written on this, but I dont understand it. Not in my area of expertise.

                      Comment


                        #12
                        later note.
                        I have the setup working.
                        clean os (2003 server) on all machines
                        windows firewall port 36973 open
                        .net 3.5 on both computers with no older versions of .net
                        I suspect that different and or multiple versions of .net caused the problem.

                        Comment


                          #13
                          problem was fixed when .net was uninstalled on the sending machine, and .net 3.5 installed. 3.5 now on both machines.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by NRITV, 06-21-2024, 02:00 PM
                          3 responses
                          18 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Started by Robertoxgiam, 09-13-2022, 10:03 AM
                          13 responses
                          4,790 views
                          0 likes
                          Last Post giuliolamedica  
                          Started by morong0414, 11-21-2022, 09:23 AM
                          120 responses
                          12,797 views
                          1 like
                          Last Post giuliolamedica  
                          Started by Topman10, Today, 05:48 AM
                          0 responses
                          4 views
                          0 likes
                          Last Post Topman10  
                          Started by ms52390, 06-20-2024, 03:48 PM
                          3 responses
                          20 views
                          0 likes
                          Last Post NinjaTrader_Gaby  
                          Working...
                          X