Knowledgebase:
ManualUpdateSLTPOrder
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 10 July 2017 09:56 AM

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

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


VertexFX Backoffice API Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions