Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Automated trade interface

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

    Automated trade interface

    Hello, I'm testing ATI with only partial success. I use the .NET Client class which works OK for sending price updates to Ninja, but I cannot see orders using Orders(account) call where account ="Sim101". Ninja is connected to External Data Feed if it is relevant, MYINSTRUMENT is a manually created stock instrument. See the code below - the charts is drawn, ask/bid are changing, orders are waiting and get filled, but no order ids are sent back although they are created and output in the Log tab. Thank you for any help.

    Code:
    static void Main(string[] args)
            {
                string account = "Sim101";
                IClient client = new Client();
                int price = 50;
                Random random = new Random();
                for (int i = 0; i < 100000; i++)
                {
                    price += random.Next(5) - 2;
                    Console.WriteLine(price);
                    client.Last("MYINSTRUMENT", price, 1);
                    client.Ask("MYINSTRUMENT", price-1, 10);
                    client.Bid("MYINSTRUMENT", price + 1, 10);
                    Thread.Sleep(100);
                    string orderIds = client.Orders(account);
                    // here orderIds is always emtpy although some orders are in working state
                }
             
                Console.ReadKey(true);
            }

    #2
    mantak007, unfortunately this would be an undocumented area we could not provide support on. From the snippet provided would not have a quick why that would be the case, I will leave this open though for community member to comment on as well.

    Comment


      #3
      OK...Would you provide support if I use DLL Interface Functions ? I believe this is documented....
      Last edited by mantak007; 07-02-2014, 05:17 AM.

      Comment


        #4
        Yes, the DLL interface would be supported.

        Comment


          #5
          I was not aware of the AT Interface switch in the menu, after switching it on everything started to work.

          One more question regarding the ATI: I'm trying to create a bridge between Ninjatrader and a custom trading platform. Using ATI (or generally External data feed), I'm able to send market data to Ninja, create orders using the Chart trader or Strategies inside Ninjatrader and send these orders' values to the external platform which then sends them to the real exchange. So far so good, this is great, but then I have no idea how to synchronize positions when an order gets filled at the exchange. Are there any means how to tell Ninjatrader real execution price and volume, e.g. in case of part fill? It seems that Ninja fills its internal trades according to ask/bid/last prices send via the External data feed, but it's obvious the real world fills will differ from the internals (due to slippage and part fills) and strategies and traders get confused by invalid order states inside Ninjatrader. Is there some external interface or internal calls on Ninjascript objects to provide this synchronization?
          Last edited by mantak007; 07-03-2014, 01:12 AM.

          Comment


            #6
            mantak007, I'm really not aware of anything supported in that area per se, one would need to keep in mind we're not talking about a full API here, but an interface designed to route external orders for execution to NT.

            Comment


              #7
              Of course, I understand. So the only option how to do that is to create an account connector, which I suppose is either undocumented or proprietary and there is currently no way how to route and synchronize external order to Ninjatrader, right? By the way, is there going to be any change in NT8 regarding external connectors or custom account plugins, would there be e.g. an interface to develop own account plugins?

              Comment


                #8
                Your understand is correct mantak007, with NinjaTrader 8 we expect to offer a much deeper NinjaScript programming framework to operate in however custom connectors would still be a non supported item very likely.

                Comment


                  #9
                  OK, no surprise then :-) Thank you.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  633 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  364 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  105 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  567 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  568 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X