CQG API 4.0 - Revised
CreateStrategyOrderByExpression Method
See Also  Send Feedback
order_type
Type of the order
expression_string

Strategy definition expression or QFormula name/number.

The QFormula name should be passed in the following format: "Q.Q_Formula_Name" (for example, "Q.MyFormula").

The QFormula number should be passed in the following format: "QQ_Formula_Number" (for example, "Q8").

cqg_account
The order will be placed by this account
cqg_accounts
Auxiliary accounts for strategy order
order_quantity
Order quantity. Signed or unsigned - depends on UseOrderSide Property
order_side
Side of the order
limit_price
Limit price for the order
stop_price
Stop price for the order
ue_name_part
Part of user friendly name
CQGCEL Interface : CreateStrategyOrderByExpression Method

Glossary Item Box

Description

Creates a new strategy order object by specified strategy expression or QFormula name/number.

Syntax

Visual Basic
Public Function CreateStrategyOrderByExpression( _
   ByVal order_type As eOrderType, _
   ByVal expression_string As String, _
   ByVal cqg_account As CQGAccount, _
   ByVal cqg_accounts As CQGAccounts, _
   ByVal order_quantity As Long, _
   Optional ByVal order_side As eOrderSide = osdUndefined, _
   Optional ByVal limit_price As Double = -2147483647, _
   Optional ByVal stop_price As Double = -2147483647, _
   Optional ByVal ue_name_part As String = "" _
) As CQGOrder

Parameters

order_type
ValueDescription
otLimit

Limit order.

otMarket

Market order.

otStop

Stop order.

otStopLimit

Stop Limit order.

otUndefined

Undefined order type.

Type of the order
expression_string

Strategy definition expression or QFormula name/number.

The QFormula name should be passed in the following format: "Q.Q_Formula_Name" (for example, "Q.MyFormula").

The QFormula number should be passed in the following format: "QQ_Formula_Number" (for example, "Q8").

cqg_account
The order will be placed by this account
cqg_accounts
Auxiliary accounts for strategy order
order_quantity
Order quantity. Signed or unsigned - depends on UseOrderSide Property
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.
Side of the order
limit_price
Limit price for the order
stop_price
Stop price for the order
ue_name_part
Part of user friendly name

Return Type

New order with specified parameters

See Also