Syntax
Public Overrides Function ManualUpdateSLTPOrder (ByVal AccountID As Integer, ByVal OrderID As Integer, ByVal lots As Double, ByVal OrderType As VertexFXBridgeAPI.OperationTypeEnum, ByVal SymbolName As String, Optional ByVal SL As Object = "", Optional ByVal TP As Object = "") As VertexFXBridgeAPI.TransResult
This function is used to update a managed order for a specific account number. After ManualUpdateSLTPOrder method executes, UpdateSLTPOrderResult event fired.
Parameters
Key | Description |
AccountID | Account number which is required to update manage order for. Value of type is Integer. |
OrderID | Order number to be Updated. Value of type is Integer. |
Lots | Order Amount of lots. Value of type is Double. |
OrderType | Order opertation type can be one of OperationTypeEnum. |
SymbolName | Order The symbol name which is required to update a manage order on. Value of type is Integer. |
SL | Stop loss value. Optional value of type Double. |
TP | Take profit value. Optional Value of Type Double. |
Return value
Returns value of type TransResult. If the request was sent to server successfully it will return Succeeded.
Sample
Private Sub UpdateSLTP_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewSLTP.Click Dim Result As VertexFXBridgeAPI.TransResult Dim vClient As VertexFXBridgeAPI.Client Dim vAccount As VertexFXBridgeAPI.Account vClient = BO.GetBO.ClientByIndex (1) vAccount = BO.GetBO.AccountByIndex (vClient.ClientID, 1) vPosition = BO.GetBO.OpenPositionByIndex (1) Dim vSymbol As VertexFXBridgeAPI.Symbol =OrderSymbol (64124) Dim OrderLots as Double = BO.GetBO.OrderLots (64124) Dim OrderType as VertexFXBridgeAPI.OperationTypeEnum= BO.GetBO.OrderBuySell (64124) Result= BO.GetBO.ManualUpdateSLTPOrder (vAccount.AccountID, 64124, OrderLots, OrderType, vSymbol.Name, 1,) End Sub
See Also