- place order via NTCommand() with unique orderID and stratID
- wait for order status to be accepted by calling NTOrderStatus(orderID)
- on a subsequent bar, call NTCommand to cancel the order using the orderID and startID
When the above is done, the order is successfully placed and shows up in the DOM and the LOG. The cancel command is submitted ok, but it shows up in the log failed with a message saying "invalid order ID/Name".
The orderID being called out is the same one that was used to create the order (as per the log). The strange thing is that when the order is accepted in the log, but the order name is renamed and does not use the ID that was passed in the NTCommand call!
So,
1. why is the orderID being renamed?
2. How can I get the orderID that was used by NT?
3. How do I cancel an order?
The following is from the log:
1/16/2008 13:26 ATI OIF 'Cancel;Sim101;@ER2;;0;;0;0;;;A685FB0CE8B847869FE9 EA609514D09E;;LongA685FB0CE8B847869FE9EA609514D09E ' invalid order ID/Name 'A685FB0CE8B847869FE9EA609514D09E'
1/16/2008 13:26 ATI AT 'Cancel;Sim101;@ER2;;0;;0;0;;;A685FB0CE8B847869FE9 EA609514D09E;;LongA685FB0CE8B847869FE9EA609514D09E ' processing
1/16/2008 13:26 Order Order='232c011f57ef46a5a5fd4644edb5496d/Sim101' Name='Entry' New State=Accepted Instrument='ER2 03-08' Action=Buy Limit price=707.2 Stop price=707.2 Quantity=2 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
1/16/2008 13:26 Order Order='232c011f57ef46a5a5fd4644edb5496d/Sim101' Name='Entry' New State=PendingSubmit Instrument='ER2 03-08' Action=Buy Limit price=707.2 Stop price=707.2 Quantity=2 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
1/16/2008 13:26 Order Submitting order with strategy
1/16/2008 13:26 ATI AT 'Place;Sim101;@ER2;Buy;2;STOPLIMIT;707.2;707.2;DAY ;;A685FB0CE8B847869FE9EA609514D09E;ER2 - IDEAL;LongA685FB0CE8B847869FE9EA609514D09E' processing
Comment