public method TradeDeskAut.ChangeTradeStopLimit3, ChangeTradeStopLimit3Async

Brief

Changes a stop/limit order for the trade, allows setting the trailing mode for stop/limit and returns the order id.

Does not work for United States based accounts. Please read NFA Compliance Rule 2-43(b). In case if this function is used Order2Go API will throw an Exception/Error.

Declaration
Visual Basic
Sub ChangeTradeStopLimit3 (wcsTradeID as String, dRate as Double, bIsStop as Boolean, iTrailMinMove as Integer, ByRef psOrderId as Variant)
IDL
[id(413)] HRESULT ChangeTradeStopLimit3( [in]BSTR wcsTradeID, [in]double dRate, [in]VARIANT_BOOL bIsStop, [in]int iTrailMinMove, [out]VARIANT* psOrderId)
Visual Basic
Sub ChangeTradeStopLimit3Async (wcsTradeID as String, dRate as Double, bIsStop as Boolean, iTrailMinMove as Integer, ByRef psRequestId as Variant)
IDL
[id(414)] HRESULT ChangeTradeStopLimit3Async( [in]BSTR sTradeID, [in]double dRate, [in]VARIANT_BOOL bIsStop, [in]int iTrailMinMove, [out]VARIANT *psRequestId)

Parameters
wcsTradeID

The trade identifier.

dRate

The rate at which the order must be set.

The distance between the rate and the current close price must be greater than the minimal conditional distance.

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

bIsStop

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

iTrailMinMove

Controls the trailing stop or limit order.

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

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

In case the 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 stop or limit orders can be not available on the server. To check whether trailing stop/limit orders with a dynamic step are available, use the PermissionCheckerAut.CanUseDynamicTrailingForStop and PermissionCheckerAut.CanUseDynamicTrailingForLimit methods. To check whether trailing stop/limit orders with a fixed step are available, use the PermissionCheckerAut.CanUseFluctuateTrailingForStop and PermissionCheckerAut.CanUseFluctuateTrailingForLimit methods.

United States based accounts must specify 0 in this parameter. Please read NFA Compliance Rule 2-43(b). In case any other value is used Order2Go API will throw an Exception/Error.

psOrderId / psRequestId

[output] The identifier of the order or request.

Details

The ChangeTradeStopLimit3 and ChangeTradeStopLimit3Async methods are defined in the TradeDeskAut class.

back