开云体育

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

updateExtended(), extended properties, etc, etc


mickjenks
 

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


bee_jay_61
 

--- 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
Once Again. Use the ActiveX properties to set OCA, TIF and Transmit.
The ActiveX is written in C++ and uses then WinSocket API. Look at
the C++ API for more information.


marinindextrader
 

Mick,

I havn't gotten to that point in my work, but perhaps ultimately OCA
is not server sided? In other words the TWS manages internally a
marker...that ostensibly is sent back and forth, but all of the OCA
work is done on the client side?

For me the point will be moot in a sense, because I intend to expand
greatly on the OCA concept.

Perhaps you might consider programming your own OCA procedures. That
way in the future, you too can also expand on them. Its simple enough
to add a flag to the dynamic array structure that tracks orders.

Just a thought...

Scott

--- 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


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