Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unable to coonect to NinjaTrader

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

    Unable to coonect to NinjaTrader

    Hello,

    I wrote a java programm that connects to NinjaTrader using the DLL. It works fine on my developing laptop (windows xp). But when I run the programm on my trading computer (windows vista) I got the following error

    "Unable to connect to NinjaTrader (localhost/36973). Please make sure NinjaTrader is running"

    The "AT Interface" in file menu is on and a connection to "Simulated Data Feed" is established.

    Do you have an idea?

    Thanks.

    Regards,
    Markus

    #2
    Hello,

    Can you connect via file>connect?
    Have you tried turning off your ATI and simulated data feed:
    File>disconnect > simulated data feed
    File>AT interface
    DenNinjaTrader Customer Service

    Comment


      #3
      Hello,

      yes, I can connect via file>connect.

      I turned on/off data feed and ATI several times. But the connection problem is still there.

      Might that be a problem of windows vista or Norton Internet Security 2010?

      What else can I do?

      Thanks.

      Regards,
      Markus

      Comment


        #4
        Markus,

        It could be firewall/antivirus. Can you please try turning those off temporarily?
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Hello,

          I solved the problem. I need to use the IP 127.0.0.1 instead of localhost to get a connection to NinjaTrader. Now it works fine.

          Regards,
          Markus

          Comment


            #6
            Hello,

            I am having the exact same problem. However, I am connecting through the 127.0.0.1 and am still getting the same error message.
            Are there any other solutions?
            Thanks in advance

            Comment


              #7
              sung87wook,

              Please check if you have any firewalls or other blocking type of software running. Please try disabling them.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Please help me to connect to NtDirect.dll. This is what I have done to establish the connectivity:
                • Downgraded NT8 to NT7 since there is note from NT support person that NtDirect.dll does not work properly with NT8
                • Installed Python 3.8 32-bit and wrote a script to connect to 32-bit version of NtDirect.dll
                • Enabled ATI in the NT7 (32-bit) that is running in the background
                • Disabled Firewall in the Windows 10 Settings
                The attempt to connect throws a popup with the following error:


                "Unable to connect to NinjaTrader (127.0.0.1/36973). Please make sure NinjaTrader is running: No connection could be made because the target machine actively refused it fe80::ff51:40fb:847e:f35b%35:36973"


                Here is a Python snippet that is used to connect:
                Code:
                import ctypes
                dll_file_path = "C:\\Program Files (x86)\\NinjaTrader7\\bin\\NtDirect.dll"
                c_lib = ctypes.WinDLL(dll_file_path)
                response_connected = c_lib.Connected(1)
                print("Connected :: ", response_connected)​

                Comment


                  #9
                  Hello alexlusher,

                  Welcome to the NinjaTrader forums!

                  While I cannot assist with an external application written in python, I can provide a link to a sample project that uses the NTDirect.dll.
                  Chelsea B.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by samish18, Yesterday, 04:01 AM
                  4 responses
                  22 views
                  0 likes
                  Last Post samish18  
                  Started by asd32, Today, 11:45 AM
                  2 responses
                  18 views
                  0 likes
                  Last Post asd32
                  by asd32
                   
                  Started by GonzaloTradingSystems, Today, 05:30 AM
                  1 response
                  19 views
                  0 likes
                  Last Post GonzaloTradingSystems  
                  Started by styvenrutchell, Today, 12:42 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post styvenrutchell  
                  Started by tkaboris, Today, 11:09 AM
                  1 response
                  7 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Working...
                  X