public method TradeDeskAut.ChangeNetStopLimit2, ChangeNetStopLimit2Async

Brief

Creates or changes a net position stop/limit order and allows setting the traling mode.

Declaration
Visual Basic
Sub ChangeNetStopLimit2 (sInstrument as String, sAccountID as String, bIsBuy as Boolean, dRate as Double, bIsStop as Boolean, iTrailMinMove as Integer, ByRef psOrderId as Variant)
IDL
[id(411)] HRESULT ChangeNetStopLimit2( [in]BSTR sInstrument, [in]BSTR sAccountID, [in]VARIANT_BOOL vbIsBuy, [in]double dRate, [in]VARIANT_BOOL vbIsStop, [in]int iTrailMinMove, [out]VARIANT *psOrderId)
Visual Basic
Sub ChangeNetStopLimit2Async (sInstrument as String, sAccountID as String, bIsBuy as Boolean, dRate as Double, bIsStop as Boolean, iTraiMinMove as Integer, lByRef sRequestId as Variant)
IDL
[id(412)] HRESULT ChangeNetStopLimit2Async( [in]BSTR sInstrument, [in]BSTR sAccountID, [in]VARIANT_BOOL vbIsBuy, [in]double dRate, [in]VARIANT_BOOL vbIsStop, [in]int iTrailMinMove, [out]VARIANT *psRequestId)

Parameters
sInstrument

The instrument the order is placed/changed for.

sAccountID

The identifier of the account.

bIsBuy

The side of the closing positions.

Note: This is not the side of the close order, but the side of the open positions that should be closed by the order.

So the (sInstrument, sAccountID, bBuy) define the closing positions.

dRate

The rate at which the order must be set.

bIsStop

The flag indicating whether the stop (True) or limit (False) order must be set.

iTrailMinMove

Controls the trailing net stop/limit order.

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

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

In case the net 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 net stop/limit orders can be not available on the server. To check whether trailing net stop/limit orders with a dynamic step are available, use the PermissionCheckerAut.CanUseDynamicTrailingForEntryStop and PermissionCheckerAut.CanUseDynamicTrailingForEntryLimit methods. To check whether trailing net stop/limit orders with a fixed step are available, use the PermissionCheckerAut.CanUseFluctuateTrailingForEntryStop and PermissionCheckerAut.CanUseFluctuateTrailingForEntryLimit methods.

psOrderId / sRequestId

[output] Returns the identifier of the net stop/limit order.
For ChangeNetStopLimit2 this parameter will return OrderID.
For ChangeNetStopLimit2Async this parameter will return RequestID.

Details

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

The ChangeNetStopLimit2 and ChangeNetStopLimit2Async methods are defined in the TradeDeskAut class.

back