Returns the position's quantity, i.e. the sum of position's open trades' quantities.
Visual Basic |
---|
Public Property Quantity As Long |
The quantity represented as Long.
Depending on UseOrderSide setting of CQG API Configuration the quantity can be signed or unsigned.
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.
See the usage of CQGPosition properties in the AccountChanged event's example section.