CQG API 4.0 - Revised
Quantity Property
See Also  Send Feedback
CQGPosition Interface : Quantity Property

Glossary Item Box

Description

Returns the position's quantity, i.e. the sum of position's open trades' quantities.

Property type

Read-only property

Syntax

Visual Basic
Public Property Quantity As Long

Return Type

The quantity represented as Long.

Depending on UseOrderSide setting of CQG API Configuration the quantity can be signed or unsigned.

Remarks

If UseOrderSide is set to True, the quantity is always positive and the position's side is shown by position's Side property.

If UseOrderSide is set to False, the quantity is positive in case of long position and negative in case of short one.

Note: If the position is liquidated, its Quantity becomes = 0. The actual CQGPosition object is not removed from the collection until the end of the trading day, when all re-calculations are taking place.

Example

See the usage of CQGPosition properties in the AccountChanged event's example section.

See Also