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 |
- order_type
Type of the orderValue Description otLimit Limit order.
otMarket Market order.
otStop Stop order.
otStopLimit Stop Limit order.
otUndefined Undefined order type.
- 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 orderValue Description osdBuy Side 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.
osdSell Side 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.
osdUndefined Side properties return this value if CQGAPIConfig.UseOrderSide is set to False. - limit_price
- Limit price for the order
- stop_price
- Stop price for the order
- ue_name_part
- Part of user friendly name