CQG API 4.0 - Revised
ActivateAllOrders Method
See Also  Send Feedback
cqg_account
An optional CQGAccount object representing the account parked orders of which to activate.
cqg_instrument

An optional CQGInstrument object representing the instrument on which the parked order should have been placed in order to be activated by this method call.

from_all_traders
An optional flag identifying whether the parked orders from all traders should be activated.
order_side
Identifies the side of the parked orders to be activated. The parameter is optional.
CQGCEL Interface : ActivateAllOrders Method

Glossary Item Box

Description

Activates a set of parked orders.

The selection of the orders to be activated is performed based on the passed arguments. If no argument is passed all currently existing parked orders are activated.

Syntax

Visual Basic
Public Sub ActivateAllOrders( _
   Optional ByVal cqg_account As CQGAccount = 0, _
   Optional ByVal cqg_instrument As CQGInstrument = 0, _
   Optional ByVal from_all_traders As Boolean = False, _
   Optional ByVal order_side As eOrderSide = osdUndefined _
) 

Parameters

cqg_account
An optional CQGAccount object representing the account parked orders of which to activate.
cqg_instrument

An optional CQGInstrument object representing the instrument on which the parked order should have been placed in order to be activated by this method call.

from_all_traders
An optional flag identifying whether the parked orders from all traders should be activated.
order_side
ValueDescription
osdBuySide properties return this value if CQGAPIConfig.UseOrderSide is set to True.

Depending on the owner, osdBuy value is returned in case of:

  • the object is a CQGTrade referring to a buy trade
  • the object is a CQGPosition referring to a long position.

  • the object is a CQGOrder referring to an order of buy type.
  • the object is a CQGFill referring to a fill of buy type.
osdSellSide properties return this value if CQGAPIConfig.UseOrderSide is set to True.

Depending on the owner, osdSell value is returned in case of:

  • the object is a CQGTrade referring to a sell trade
  • the object is a CQGPosition referring to a short position.

  • the object is a CQGOrder referring to an order of sell type.
  • the object is a CQGFill referring to a fill of sell type.
osdUndefinedSide properties return this value if CQGAPIConfig.UseOrderSide is set to False.
Identifies the side of the parked orders to be activated. The parameter is optional.

Remarks

This method works in asynchronous mode, which means that it returns after the request is sent, but without waiting for its results.

If the order is not parked and the user tries to activate it, an exception will be thrown.

This method changes the order status to osInOrderBook. The change will be reported via OrderChanged event.

Example

See the usage of CQGCEL methods in the OrderChanged event's example section.

See Also