RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



Cancelling partially filled order? Expand / Collapse
Message
Posted 11/22/2010 02:24:04 Post #12570
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
Hi,

Just to confirm something, suppose if I have an order attached to a position. Let say, the order (size=100) is already filled partially (filled size = 50). What will happen if I cancel this order? Will the partially filled "Trade" still be calculated correctly? And what would be the state of the Order (BrokerOrderState.Cancelled or BrokerOrderState.PendingCancel)?


Thanks,
Felix
Posted 11/22/2010 02:37:37 Post #12571
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
Oh, and also with above circumstance , the filled order doesn't automatically get closed right? (e.g. we have to close them manually)
Posted 11/22/2010 12:10:49 Post #12576
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
Yes, any fill received (partial or not) results in a trade being created on the position. If the rest of the order is subsequently cancelled it won't affect the already filled part of it. I don't believe the PendingCancel state is actually used (and it is going to be removed in the next major version). When you call CancelOrder, the CancelPending property of the Order object will be set to true. Then, when the broker acknowledges that the order has been cancelled, the order state will be set to Cancelled.

The partially filled order will result in an open position, and the open position won't automatically get closed if a partially filled entry order is cancelled.

Thanks,
Daniel
Posted 11/22/2010 15:47:03 Post #12577
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
Hi,

I think i got it. Thanks a heap for a great support!

Felix

P.S: It's funny how cancel implementation in RightEdge use similar concept compared to my cancel implementation (E.g. set cancel flag and pray...)
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: billb, young, dplaisted

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 4:59pm

2005-2007 © RightEdge Systems