开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: updateExtended(), extended properties, etc, etc


BrianL_98
 

Hi,

If you are still wondering how to place an OCA in VB, I did some
testing today and was able to get it to work. Here's what you do:
The OCA property has a default value of null (""). Set this property
to some other value. Successive order placements using placeOrder()
will all be grouped together as OCA orders. When done, you should
reset the OCA property to null.

Here's a code snippet that sets two OCA stop orders:

Tws1.oca = "test2"
Tws1.placeOrder NextID, "BUY", 1, "ES", _
"FUT", "200209",
0, "", "GLOBEX", "", "STP", 0, 1035
NextID = NextID + 1
Tws1.placeOrder NextID, "SELL", 1, "ES", _
"FUT", "200209",
0, "", "GLOBEX", "", "STP", 0, 1000#
NextID = NextID + 1
Tws1.oca = ""


--Brian



--- In twsapi@y..., mickjenks <no_reply@y...> wrote:
Thanks Elliot,

However, I have read the TWS docs and understand the purpose of
OCA.
That was never the question. The placeOrder() method doesn't
include
in its declaration a variable for sending an OCA identifier, nor
does
it allow for TIF or Transmit to be sent with the individual orders.
Could someone explain how to implement these properties on an order
to order basis? Thanks

Join [email protected] to automatically receive all group messages.