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); }
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Automated trade interface
Collapse
X
-
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:Tags: None
-
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
-
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
-
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
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by cre8able, 02-11-2023, 05:43 PM
|
3 responses
236 views
0 likes
|
Last Post
by rhubear
Today, 10:46 AM
|
||
Started by frslvr, 04-11-2024, 07:26 AM
|
8 responses
113 views
1 like
|
Last Post Today, 10:30 AM | ||
Started by stafe, 04-15-2024, 08:34 PM
|
10 responses
46 views
0 likes
|
Last Post
by stafe
Today, 10:29 AM
|
||
Started by rocketman7, Today, 09:41 AM
|
3 responses
11 views
0 likes
|
Last Post Today, 10:07 AM | ||
Started by traderqz, Today, 09:44 AM
|
2 responses
10 views
0 likes
|
Last Post Today, 10:00 AM |
Comment