NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 03-02-2005, 05:35 AM   #1
scjohn
Senior Member
 
Join Date: Dec 2004
Location: , ,
Posts: 226
Thanks: 0
Thanked 11 times in 8 posts
Post imported post

This seems to deal with how long it takes NT to actually cancel a pending order.

"3/2/2005 1:09:01 PM SUBMIT ORDER ENTRY1: S 2 @ Limit Price:640.4 Stop Price:640.4 Order Id: Position Id:ER2 03-05 SIM-101 611317811 Simulation"
"3/2/2005 1:09:01 PM ORDER STATUS ENTRY1 ER2 03-05: PENDING S Type:STOPLIMIT Qty:2 @ Limit Price:640.4 Stop Price:640.4 Position Id:ER2 03-05 SIM-101 611317811 Order Id: Simulation"
"3/2/2005 1:09:03 PM ORDER STATUS ENTRY1 ER2 03-05: ACP_XCHG S Type:STOPLIMIT Qty:2 @ Limit Price:640.4 Stop Price:640.4 Position Id:ER2 03-05 SIM-101 611317811 Order Id:61139134SIM Simulation"
"3/2/2005 1:14:00 PM CANCEL ORDER ENTRY1: S 2 @ Limit Price:640.4 Stop Price:640.4 Order Id:61139134SIM Position Id:ER2 03-05 SIM-101 611317811 Simulation"
"3/2/2005 1:14:00 PM ORDER STATUS ENTRY1 ER2 03-05: CANCELING S Type:STOPLIMIT Qty:2 @ Limit Price:640.4 Stop Price:640.4 Position Id:ER2 03-05 SIM-101 611317811 Order Id:61139134SIM Simulation"
"3/2/2005 1:14:02 PM AT 'ORDER OIF' ABORTED: Can't place order while entry order is pending"
"3/2/2005 1:14:02 PM ORDER STATUS ENTRY1 ER2 03-05: CANCELING S Type:STOPLIMIT Qty:2 @ Limit Price:640.4 Stop Price:640.4 Position Id:ER2 03-05 SIM-101 611317811 Order Id:61139134SIM Simulation"
"3/2/2005 1:14:02 PM ORDER STATUS ENTRY1 ER2 03-05: CANCELLED S Type:STOPLIMIT Qty:2 @ Limit Price:640.4 Stop Price:640.4 Position Id:ER2 03-05 SIM-101 611317811 Order Id:61139134SIM Simulation"

We have a pending orderand I then issue an AT Cancel command. The Cancel file was created at 1:13:59 and deleted at 1:14:02. A new OIF file was created at 1:14:02 and deleted at 1:14:04. NT rejected the OIF order at 1:14:02, which is in the middle of the Canel sequence (see log).

How am I suppose to know that NT has "really" finished handling the Cancel command. It would appear that one can not count on the fact that just because the Cancel file has been deleted, that AT has finished canceling the pending order.
scjohn is offline  
Reply With Quote
Old 03-02-2005, 06:03 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Post imported post

Cancel in simulation can be be as much as2 seconds longer than what you can expect in real-time. The only way to verify an order has been cancelled is to use the passthrough mode and monitor order status files.
NinjaTrader_Ray is offline  
Reply With Quote
Old 03-02-2005, 07:52 AM   #3
scjohn
Senior Member
 
Join Date: Dec 2004
Location: , ,
Posts: 226
Thanks: 0
Thanked 11 times in 8 posts
Post imported post

In theory, when using an OIF file to enter a trade, and then using a Cancel file, to cancel a pending strategy. Once the AT Cancel command is excuted, the PUF file should also be deleted. I guess the question is: if the PUF file is no longer there, has NT really finished with the cancel process?
scjohn is offline  
Reply With Quote
Old 03-02-2005, 08:57 AM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Post imported post

PUFS are not deleted only updated.
NinjaTrader_Ray is offline  
Reply With Quote
Old 03-03-2005, 12:33 AM   #5
scjohn
Senior Member
 
Join Date: Dec 2004
Location: , ,
Posts: 226
Thanks: 0
Thanked 11 times in 8 posts
Post imported post

PUFs do get deleted. Even the documentation says so:

"The PUF will remain and will only be overwritten once a new automated position with the same INSTRUMENT NAME/ACCOUNT NAME parameters is opened. The only exception is that the PUF will be deleted if an ENTRY order was cancelled."
scjohn is offline  
Reply With Quote
Old 03-03-2005, 01:21 AM   #6
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Post imported post

Sorry, sometimes I can't remember every little detail.The PUF is deleted once the entry order for the pending strategy is confirmed cancelled.
NinjaTrader_Ray is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:37 PM.