CQG API 4.0 - Revised
UseOrderSide Property
See Also  Send Feedback
CQGAPIConfig Interface : UseOrderSide Property

Glossary Item Box

Description

Specifies the object's side identification method.

The default value is False.

Property type

Read-write property

Syntax

Visual Basic
Public Property UseOrderSide As Boolean

Return Type

True if eOrderSide is to be used, False otherwise.

Remarks

Some interfaces included starting from v.3.0 have "sides", i.e. for trades it is buy/sell, for positions it is long/short.

In CQG API, there are two possible ways of identifying sides:

  • Using the Order Side notion:
    if the trade, fill, order is buy or position is long, the Side properties of corresponding objects return osdBuy;
    if the trade, fill, order is sell or position is short, the Side properties of corresponding objects return osdSell.

In this case Quantity properties of these objects are always positive.

  • Using signed quantities:
    if the trade, fill, order is buy or position is long, the Quantity properties of corresponding objects are positive;
    if the trade, fill, order is sell or position is short, the Quantity properties of corresponding objects are negative.

In this case Side properties of these objects are always osdUndefined.

Example

See the usage of UseOrderSide property in the AccountChanged event's example section.

See Also