Syntax
Public Function ManualUpdateSLTPOrder(AccountID As Integer, OrderID As Integer, Lots As Double, OrderType As OperationTypeEnum, SymbolName As String, Optional SL As Object = "", Optional TP As Object = "", Optional TransTag As String = "") As CallingResultsEnum
Description
This function is used to update a managed order without the need to select an account. After ManualUpdateSLTPOrder method executes the UpdateSLTPOrderResult event fires.
Parameters
Parameter | Description |
AccountID | Account number to update mange order for, value of type is Integer |
OrderID | Order number to be updated, value of type is Integer |
Lots | Order amount of lot, value of type is Double |
OrderType | Order operation type, value of type is OperationTypeEnum |
SymbolName | Order symbol name, value of type is String |
SL | Stop lose value, Optional value of type Double |
TP | Take profit value, Optional value of type Double |
TransTag | String value is used to mark the new SLTP order operation when the result came from the server. |
Return value
Returns value of type CallingResultsEnum. If the request was sent to server successfully it will return SuccessResult
Sample
Private Sub UpdateSLTP_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UpdateSLTP.Click BOAPI is predefined variable as CVertexBOAPI Dim Result as CallingResultsEnum Dim vOrder as COOrder Dim vAccount as COAccount vAccount = BOAPI.AccountByIndex (1) vOrder = BOAPI.OrderByIndex (1) Result = BOAPI.ManualUpdateSLTPOrder(vAccount.AccountID,vOrder.OrderID, vOrder.lots, vOrder.OrderType, vOrder.SymbolName, 1,, Update SLTP by BOAPI) Msgbox (Result.ToString) End sub
See Also