View Full Version : Use "change" if order not filled yet?
Folls
10-04-2010, 07:06 PM
From tradestation, can I send send a "change" command to move a stop entry order that has not been filled yet? I'm getting an error "invalid order ID/Name" in the Log.
Thanks,
Folls
NinjaTrader_Bertrand
10-05-2010, 04:15 AM
Folls, what order id / strategy id value are you using in your TS Change command? This should be the same as you assign in the initial Place command for the order.
Folls
10-05-2010, 07:27 PM
I believe I am sending the same ID. However, I can't double check and post it for you because I can't see the Log from yesterday. Is there a way to see yesterday's Log?
Thanks!
Folls
NinjaTrader_Bertrand
10-06-2010, 03:59 AM
You can check into the individual day's log directly under the MyDocuments > NT 6.5 / 7 > log folders.
Folls
10-07-2010, 07:43 PM
It looks like I'm sending the correct ID. Can I change an order that hasn't been filled?
10/4/2010 10:46:59 AM|1|1|AT, 'Place;Sim101;TF 12-10;Sell;1;StopLimit;666.4;666.6;Day;;2;TF-1;2' processing
10/4/2010 10:46:59 AM|1|32|Submitting order with strategy
10/4/2010 10:46:59 AM|1|32|Order='338f841422a4428083b5abf2c4b701ac/Sim101' Name='Entry' New State=PendingSubmit Instrument='TF 12-10' Action=Sell Limit price=666.4 Stop price=666.6 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
10/4/2010 10:47:00 AM|1|32|Order='338f841422a4428083b5abf2c4b701ac/Sim101' Name='Entry' New State=Accepted Instrument='TF 12-10' Action=Sell Limit price=666.4 Stop price=666.6 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
10/4/2010 10:47:59 AM|1|1|AT, 'Change;Sim101;TF 12-10;Sell;1;StopLimit;666.5;666.7;Day;;2;TF-1;2' processing
10/4/2010 10:47:59 AM|3|1|OIF, 'Change;Sim101;TF 12-10;Sell;1;StopLimit;666.5;666.7;Day;;2;TF-1;2' invalid order ID/Name '2'
Thanks!
Folls
NinjaTrader_Bertrand
10-08-2010, 05:28 AM
Yes, that should be for sure possible - if you query the working orders id for the account? What value would you get back?
Folls
10-11-2010, 07:48 PM
Here is a case from today were the change was not accepted but the cancel was. Both referenced the same OrderID of 4.
10/11/2010 2:27:00 PM|1|1|AT, 'Place;Sim101;TF 12-10;Buy;1;StopLimit;695;694.8;Day;;4;TF-1;4' processing
10/11/2010 2:27:00 PM|1|32|Submitting order with strategy
10/11/2010 2:27:00 PM|1|32|Order='0d7949c559c34fce905752ce895c9465/Sim101' Name='Entry' New State=PendingSubmit Instrument='TF 12-10' Action=Buy Limit price=695 Stop price=694.8 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
10/11/2010 2:27:00 PM|1|32|Order='0d7949c559c34fce905752ce895c9465/Sim101' Name='Entry' New State=Accepted Instrument='TF 12-10' Action=Buy Limit price=695 Stop price=694.8 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
10/11/2010 2:28:00 PM|1|1|AT, 'Change;Sim101;TF 12-10;Buy;1;StopLimit;694.9;694.7;Day;;4;TF-1;4' processing
10/11/2010 2:28:00 PM|3|1|OIF, 'Change;Sim101;TF 12-10;Buy;1;StopLimit;694.9;694.7;Day;;4;TF-1;4' invalid order ID/Name '4'
10/11/2010 2:29:00 PM|1|1|AT, 'Cancel;;@TF.D;;0;;0;0;;;4;;' processing
Also, I did the query you requested. Here is the output that corresponds to the log file entries above:
10/11/2010 1428 Ninja: Order IDs: 1|8fee7f3ae48143f7859bb288af8b1917|ea07b76518b041d 780b85d118fb1663d|2|5f9aca5d57a1414897366e8c33a7c9 10|1f3a613507cf418db8ff7cd012051b84|3|51a155c02704 4f93bf5135a0fa4fd129|b27cf86b3d9c4cb7ab1f60dcfb0dc 446|4
10/11/2010 1428 Ninja: Buy STOPLIMIT MOVE sent to NT. Result: 0 Stop: 694.70 StopLimit: 694.90
I have no idea what that OrderID output means. Do you?
Also, the order seems to have been accepted with Result 0 (not -1).
I don't understand what is happening. Any help?
Thanks!
Folls
NinjaTrader_Bertrand
10-12-2010, 09:30 AM
Folls, thanks - the logs would list the order id that NT then assigns as the order is taken into it's system, the one you assigned is for TS code management of orders. Could you please send me the TS code you use for your testing so I could give it a run on my end?
You can reach me under support at ninjatrader dot com Attn Bertrand - thanks in advance.