Posted 10/21/2009 11:28:10
|
|
|
|
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 10/22/2009 09:51:48
|
|
|
|
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 10/22/2009 10:29:34
|
|
|
|
| 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 10/23/2009 06:45:37
|
|
|
|
Thanks billb and dplaisted.
OrderUpdated event shoudl be called when order cancelled.
|
|
|
|