Knowledgebase: > Methods
Posted by Mohammad Rahhal, Last modified by Diana Alkouni on 25 August 2020 10:13 AM


 Public Function ManualManualNewSLTPOrder (AccountID As Integer, Ticket As Integer, Lots As Double,OrderType As OperationTypeEnum ,SymbolID As Integer, Optional SL As Variant = "", Optional TP As Variant = "", Optional TransTag As String = "") As CallingResultsEnum


This function is used to create a manage order to an existing position without the need to select an account, after ManualNewSLTPOrder method executes the NewSLTPOrderResult event will fire.


Parameter Description 
AccountID Account number which is required to create mange order for, value of type is Integer
Ticket Position ticket number to be managed, value of type is String
Lots Amount of lot, value of type is Double
OrderType Operation type value of type OperationTypeEnum 
SymbolID The symbol ID which is required to open a mange order on, value of type is Integer
SL Stop lose value, Optional value of type is Double
TP Take profit value, Optional value of type is Double
TransTag Optional string value used to mark the managed order operation when the result returns from server

Return value

Returns value of type CallingResultsEnum. If the request was sent to the server successfully, it will return SuccessResult.


 Private Sub NewSLTP_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewSLTP.Click 

   ‘BOAPI is predefined variable as CVertexBOAPI  

   Dim Result as CallingResultsEnum
   Dim vpos as COOpenposition
   Dim vAccount as COAccount
   Dim vClient as COClient
   Dim vSymbol as COSymbol
   vClient  = BOAPI.ClientByIndex(1)
   vAccount = BOAPI.AccountByIndex (vClient.ClientID,1) 
   vpos= BOAPI.OpenPositionByIndex (1)
   vSymbol = BOAPI.symbolByIndex (1)
   Result = BOAPI.ManualNewSLTPOrder(vAccount.AccountID, vpos.Ticket, 0.1, vSymbol.ID,1,"","SLTP by BOAPI")
   Msgbox (Result.ToString) 

 End sub

See Also

VertexFX Backoffice API Index

(0 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
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