public method TradeDeskAut.ChangeEntryOrderStopLimitELS, ChangeEntryOrderStopLimitELSAsync

Brief

Changes either a secondary stop or limit order associated with the entry order in ELS order group. Allows to choose the kind of stop/limit orders.

Declaration
Visual Basic
Sub ChangeEntryOrderStopLimitELS (sOrderID as String, dSLRate as Double, iSLType as Integer, iTrailMinMove as Integer, ByVal psOrderId as Variant)
IDL
[id(436)] HRESULT ChangeEntryOrderStopLimitELS( [in]BSTR sOrderID, [in]double dSLRate, [in]int iSLFlag, [in]int iTrailMinMove, [out]VARIANT* psOrderId)
Visual Basic
Sub ChangeEntryOrderStopLimitELSAsync (sOrderID as String, dSLRate as Double, iSLType as Integer, iTrailMinMove as Integer, ByVal psRequestId as Variant)
IDL
[id(437)] HRESULT ChangeEntryOrderStopLimitELSAsync( [in]BSTR sOrderID, [in]double dSLRate, [in]int iSLFlag, [in]int iTrailMinMove, [out]VARIANT *psRequestId)

Parameters
sOrderID

The identifier of the entry order.

dSLRate

The rate or the offset in pips for the secondary stop or limit order. The interpretation of the parameter depends on the value of the iSLType parameter.

For a secondary stop order, the distance between the specified stop level and the primary entry order rate must be greater than the sum of the minimal conditional distance and the current spread.

For a secondary limit order, the distance between the specified limit level and the primary entry order rate must be greater than the minimal conditional distance.

You can retrieve the value of the minimal conditional distance using methods of TradingSettingsProviderAut interface.

iSLType

The type of the secondary stop or limit order. The value defines interpretation of dSLRate parameter. The parameter can have the following values:

TradeDeskAut.SL_STOP

Use this value in case the secondary stop order must be changed.

TradeDeskAut.SL_LIMIT

Use this value in case the secondary limit order must be changed.

TradeDeskAut.SL_PEGSTOPOPEN

Use this value in case the secondary stop order must be the pegged stop order and its offset must be added to the open price (see Order Types for information about pegged orders).

The offset is specified in pips.

For a buy primary entry order, a secondary stop order must be below open price minus current spread, i.e. the offset must be negative and must be less than "-" spread.

For a sell secondary order, a secondary stop order must be above open price plus current spread. i.e. the offset must be positive and must be bigger than spread.

TradeDeskAut.SL_PEGSTOPCLOSE

Use this value in case the secondary stop order must be the pegged stop order and its offset must be added to the close price (see Order Types for information about pegged orders). 'Close price' means the bid price at the moment of the long position opening (buy) and the ask price at the moment of short (sell) position opening.

The offset is specified in pips.

For a buy primary entry order, a secondary stop order must be below close price, i.e. the offset must be negative.

For a sell primary entry order, a secondary stop order must be above close price, i.e. the offset must be positive.

TradeDeskAut.SL_PEGLIMITOPEN

Use this value in case the secondary limit order must be the pegged limit order and its offset must be added to the open price (see for information about pegged orders).

The offset is specified in pips.

For a buy primary entry order, a secondary limit order must be above the open price, i.e. the offset must be positive.

For a sell primary order, a secondary limit order must be below the open price, i.e. the offset must be negative.

TradeDeskAut.SL_PEGLIMITCLOSE

Use this value in case the secondary limit order must be the pegged limit order and its offset must be added to the close price (see Order Types for information about pegged orders). 'Close price' means the bid price at the moment of the long position opening (buy) and the ask price at the moment of short (sell) position opening.

The offset is specified in pips.

For a buy primary order, a secondary limit order must be above the close price plus current spread, i.e. the offset must be positive and must be bigger than spread.

For a sell primary order, a secondary limit order must be below the close price minus current spread. i.e. the offset must be negative and must be less than "-" spread.

For example, to set the secondary limit order, specify in this parameter tradeDesk.SL_LIMIT. To set the pegged secondary stop order the offset of which will be added to the open price, specify in this parameter tradeDesk.SL_PEGSTOPOPEN and so on.

iTrailMinMove

Controls the trailing mode for the secondary stop or limit order.

In case the secondary stop/limit order must not be trailing, specify 0 in this parameter.

In case the secondary stop/limit order must be trailing with a dynamic step, specify 1 in this parameter.

In case the secondary stop/limit order must be trailing with a fixed step, specify the size in pips of the market movement after which the order must be moved following the market. The value must be from the minimum to the maximum allowed value defined on the server. To check the values, use the methods of the TradingSettingsProviderAut interface.

Note that trailing orders can be not available on the server. To check whether trailing orders with a dynamic step are available, use the PermissionCheckerAut.CanUseDynamicTrailingForEntryStop and PermissionCheckerAut.CanUseDynamicTrailingForEntryLimit methods. To check whether trailing orders with a fixed step are available, use the PermissionCheckerAut.CanUseFluctuateTrailingForEntryStop and PermissionCheckerAut.CanUseFluctuateTrailingForEntryLimit methods.

psOrderId / psRequestId

[output] Returns the identifier of the secondary stop or limit order.
For ChangeEntryOrderStopLimitELS this parameter will return OrderID.
For ChangeEntryOrderStopLimitELSAsync this parameter will return RequestID.

Details

The ChangeEntryOrderStopLimitELSAsync method is implemented for asynchronous execution. The last output parameter will return RequestID, instead of OrderID (see declaration above). An event with this RequestID will confirm that command has been executed.

The ChangeEntryOrderStopLimitELS and ChangeEntryOrderStopLimitELSAsync methods are defined in the TradeDeskAut class.

back