I'm working on an app to integrate with NinjaTrader, and for various reasons I want it to be external and not part of the NinjaScript interface.
I've configured the C# sample app and run it. However, I simply cannot get the documented Orders() method to return anything for account SIM101, even though I'm running the simulated feed and the account is there, and I've placed orders in it, both through Control Center and through the sample app.
Another concern is that my orders placed from the sample app don't seem to show up in the Control Center...so I'm concerned it's broken all around.
See here:
// Submit the order if (cboOrderType.Text == "MARKET") success = client.Command("PLACE", "SIM101", instrument, action, quantity, "MARKET", 0, 0, "DAY", "", orderId, "", ""); else if (cboOrderType.Text == "LIMIT") success = client.Command("PLACE", "SIM101", instrument, action, quantity, "LIMIT", (double) nudLimitPrice.Value, 0, "DAY", "", orderId, "", ""); else if (cboOrderType.Text == "STOP") success = client.Command("PLACE", "SIM101", instrument, action, quantity, "STOP", 0, (double) nudStopPrice.Value, "DAY", "", orderId, "", ""); else if (cboOrderType.Text == "STOPLIMIT") success = client.Command("PLACE", "SIM101", instrument, action, quantity, "STOPLIMIT", (double) nudLimitPrice.Value, (double) nudStopPrice.Value, "DAY", "", orderId, "", ""); System.Console.WriteLine(client.Orders("SIM101"));
Am I doing something wrong here?
Comment