Ok, here goes. I have an automated strategy that trades EURUSD. When the entry conditions are right, the strategy submits 5 market orders simultaneously. The orders are 60k, 40k, 20k, 20k, 20k. I also submit profit targets and stops along with these orders. Also, I use the managed orders process. Ok, this morning the entry strategy was triggered and if I am reading the log files correctly, NT submitted the orders correctly but IB split up the 60k order into 2 actual orders of 50k and 10k. What happened after that is a little bit of a mystery but what I think happend was NT tried to pair a target and stop with the 10k order and IB rejected the order. When it rejected the order, NT then flattened everything. I understand that orders get broken up but how or can I control this through a strategy? I didn't really loose any money this morning but I did miss out on a nice opportunity. Any suggestions would be most appreciated.
Maybe would have been good if you posted actual error messages from the Ninja log file. But if you wish fine control over the orders and execution you should use following events:
OnOrderUpdate() and OnExecution()
OnExecution it seems method that could help with your problem as this is the place where you can manage partial fills and so on to decide what you do. The NinjaTrader help guide section 10.4.7.27 OnExecution() can help you.
If you need any specific samples or further help feel free to let me know.