• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATI Communications

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

    ATI Communications

    I wrote a custom application to calculate position size. The next step in the process is to import the price data from NinjaTrader.


    I understand that I need the ATI, but where to start? Where are the DLL or COM files? How does my application communicate with NinjaTrader? Please point me to the correct documentation files.

    #2
    I removed your link with .EXE in it since this is against policy. Following is the starting point in our Help Guide for the ATI.

    http://www.ninjatrader-support.com/H.../Overview.html
    RayNinjaTrader Customer Service

    Comment


      #3
      I wrote a very simple app to test basic communication, which is pasted below. NinjaTrader.Client.dll was copied to the same directory as the .cs file.

      When compiling from command:
      csc test.cs
      The type or namespace name 'NinjaTrader' could not be found. Are you missing a using directive... ?

      If NinjaTrader.Client.dll is corrrect, why does the compiler not recognize the namespace?

      Code:
      using System;
      using System.Windows.Forms;
      using NinjaTrader;
      using NinjaTrader.Client;
       
      namespace CorrelCalcApp
      {
          static class CorrelCalc
          {
              static void Main()
              {
        if (commsCheck == 0) Console.WriteLine("Connected Successfully");
        else Console.WriteLine("Failed to Connect.");
              }
          }
       
          public class Comms
          {
       private Client client;
       int commsCheck = client.Connected(0);
       
       private void OnLoad(object sender, EventArgs e)
              {
                  // Create new client object
                  client = new Client();
              }
              private void OnFormClosing(object sender, FormClosingEventArgs e)
              {
                  // Clean up
                  client.TearDown();
              }
          }
      }
      Last edited by texasnomad; 11-01-2008, 11:51 PM.

      Comment


        #4
        Unfortunately this is beyond what we can provide support for.

        However here is a hint: clicking on the error in VisualStudio brings you to the offending line. From here you can resolve the error with the assistance of the VisualStuatio help system.
        DierkNinjaTrader Customer Service

        Comment


          #5
          Dierk,

          Thanks for the extra effort. I got the simple test working using the code below. I thought I would post it here for future reference.

          Compiling from Command:
          csc /reference:NinjaTrader.Client.dll Test.cs

          Test.cs code:
          Code:
          using System;
          using NinjaTrader;
          using NinjaTrader.Client;
          namespace Tester
          {
              static class Test
              {
                  static void Main()
                  {
             // Create an instance from NinjaTrader.Client.dll
                      Client client = new Client();
           
             // Reference the "client" instance and Connected() method to make sure NT works properly
             // 0 indicates a good connection.  Non-zero values indicate a failed connection.
                      if (client.Connected(0) == 0) Console.WriteLine("Connected Successfully");
                      else Console.WriteLine("Failed to Connect.");
                  }
              }
          }

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by juju075, Today, 02:04 PM
          0 responses
          1 view
          0 likes
          Last Post juju075
          by juju075
           
          Started by FiftyFib FX, Today, 01:45 PM
          0 responses
          2 views
          0 likes
          Last Post FiftyFib FX  
          Started by researcher247, Today, 01:21 PM
          3 responses
          5 views
          0 likes
          Last Post NinjaTrader_Tyler  
          Started by sandman, Today, 12:33 PM
          3 responses
          15 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by junkone, Today, 12:13 PM
          4 responses
          15 views
          0 likes
          Last Post junkone
          by junkone
           
          Working...
          X