Is there a function to "Cancel all pending orders for a strategy" ? (using IB broker)..
I enter a position manually and exit with an auto strategy , it works great but pending orders are not cancelled..(stops, limit orders etc.)..
* How can I cancel all pending orders (after the position is closed with a profit or loss) with PL code ?
PL Code to Cancel Pending Orders Needed
- Smoky
- Posts: 518
- Joined: 03 Dec 2010
- Location: Thailand
- Has thanked: 99 times
- Been thanked: 121 times
Re: PL to cancel pending orders
Maybe with MC10 ...
IB API send back to MC all status order, auto-trading and manual order.
make this test. open MC with IB connected, use IB workstation to send yours trades, you will see them on MC !
waiting for new order engine too
IB API send back to MC all status order, auto-trading and manual order.
make this test. open MC with IB connected, use IB workstation to send yours trades, you will see them on MC !
waiting for new order engine too
Re: PL to cancel pending orders
It would be helpful to see your code. There should be a reference to market position in your signal where these pending orders are generated. When your signal is calculated after you are flat so now MP=0 and the signal says MP<>0 then that statement is false and the orders should be cancelled.Is there a function to "Cancel all pending orders for a strategy" ? (using IB broker)..
I enter a position manually and exit with an auto strategy , it works great but pending orders are not cancelled..(stops, limit orders etc.)..
* How can I cancel all pending orders (after the position is closed with a profit or loss) with PL code ?
-
- Posts: 742
- Joined: 09 Apr 2010
- Location: Texas
- Has thanked: 483 times
- Been thanked: 274 times
- Contact:
Re: PL to cancel pending orders
************************************************************It would be helpful to see your code. There should be a reference to market position in your signal where these pending orders are generated. When your signal is calculated after you are flat so now MP=0 and the signal says MP<>0 then that statement is false and the orders should be cancelled.Is there a function to "Cancel all pending orders for a strategy" ? (using IB broker)..
I enter a position manually and exit with an auto strategy , it works great but pending orders are not cancelled..(stops, limit orders etc.)..
* How can I cancel all pending orders (after the position is closed with a profit or loss) with PL code ?
Tony: I generate the open orders using "chart trader" in MC...(example, limit order below current position, trying to get lower basis on the position, profit target hit before limit order, so position is closed but limit order remains on chart and on IB.)..