I actually haven't researched scenarios with multiple contracts or
more than 2 orders in the oca group. I use separate orders (and oca
groups) for 1 contract each which allows separate prices for each leg
and eliminates partial fill guessing games. I understand this would not
be efficient for large numbers of contracts but that is not an issue for
me - not quite up to trading 50 contracts at a time!
I send an empty field for the oca type and it has always canceled the
other side when one of the sides executes.
I'm not sure of your usage needs but normally you would want the other
side reduced proportionately rather than canceled. If you have a profit
and stop exit for 5 contracts and 3 of your profit exits fill, you
normally would want 2 contracts remaining on the stop. Otherwise you
have no stop exit and a position of 2 contracts.
Doesn't seem like I'm helping much but this is what I have experienced
with the oca's.
toggle quoted message
Show quoted text
On 7/19/2013 12:48 PM, Davqe wrote:
The ocaType is in the C++ API documentation for the Order structure
(also in IOrder for ActiveX and I assume similar for other languages).
There are 2 blocking types, which guarantee that only 1 order will get
filled out of the group (eliminating possible overfill issue), and 1
type that does not block. I imagine because I am using the blocking
type, even native (LMT for example) orders get held on the server. But
there doesn't appear to be an option to cancel the other orders
without the blocking, only to reduce them.
Does your first fill order cancel all of the others, or does it just
reduce the others by the same amount of the fill?
--- In TWSAPI@... <mailto:TWSAPI%40yahoogroups.com>, Ed
<news1000@...> wrote:
Hmm. I use oca all the time and the limit orders are on the exchange.
I didn't know there were 'oca types' so maybe that changes how orders
are handled. If you use the default oca type do you still have the
issue?
I have been reading the TWS docs but haven't found a description of the
oca types.
On 7/19/2013 11:25 AM, Davqe wrote:
When I mouse over the profit exit, it says the order is being held
and
monitored just like the stop order. The row for the order on TWS
shows
the status column as dark blue, where if I place a single limit order
with no OCA, mousing over states that it is at the exchange and the
status color is green.
--- In TWSAPI@... <mailto:TWSAPI%40yahoogroups.com>
<mailto:TWSAPI%40yahoogroups.com>, Ed
<news1000@> wrote:
Limit orders are native to globex so your profit exit will be at the
exchange. This has nothing to do with oca.
The stop is not native so it must be simulated by ib.
If you mouse over the profit limit you should see a popup messsage
saying the order is at the exchange.