Profile Picture

Cancel Order

Posted By babyface 8 Years Ago
Message
Posted Wednesday October 21 2009
I have finished the IBroker plugin.
I can submit a limit order successful in RE gui menu , and can find it in pending order,
when cancel order, the function CancelOrder returns true, and the order was removed from open orders,
in fact , it was cancelled in real broker, but it still in the "Pending Orders" tab in RE.
Any one knows the reason?
We need to write some code to manually delete it from "Pending Orders"?
Posted Thursday October 22 2009
We don't know what's happened with the broker until we're told. The broker likely has an event that informs your code that something happened to an order (filled, cancelled, rejected, etc). This needs to be communicated back to RightEdge and RightEdge updates internally and passes the information to the trading system that's currently running.

To see a real running broker plugin, we have released the source code to our Interactive Brokers plugin

babyface (10/21/2009)
I have finished the IBroker plugin.
I can submit a limit order successful in RE gui menu , and can find it in pending order,
when cancel order, the function CancelOrder returns true, and the order was removed from open orders,
in fact , it was cancelled in real broker, but it still in the "Pending Orders" tab in RE.
Any one knows the reason?
We need to write some code to manually delete it from "Pending Orders"?
Posted Thursday October 22 2009
So specifically, returning true from CancelOrder doesn't mean the order has been actually cancelled, it means that the request to cancel the order has been sent. It's still possible that the order could be filled before the broker processes the cancel. So the broker plugin needs to set the order status to Cancelled and raise the OrderUpdated event to let RightEdge know when the order was actually cancelled.
Posted Friday October 23 2009
Thanks billb and dplaisted.
OrderUpdated event shoudl be called when order cancelled.


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems