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


 Public Function UpdateOpenPosition (TicketID As Integer, NewLots As Double, NewPrice As Double, NewType As OperationTypeEnum, NewInterest As Double, NewComment As String) As CallingResultsEnum


This function is used to update the existing position. After UpdateOpenPosition method is executed the UpdateOpenPositionResult event will fire.


Parameter Description 
TicketID Ticket order which is required to be updated, value of type is Integer
NewLots Updated amount of lots, value of type is Double
NewPrice Updated price value, value of type is Double
NewType Updated operation type, value of type is OperationTypeEnum
NewInterest Updated interest value, value of type is Double
NewComment The new comment value of type is String

Return value

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


 Private Sub UpdatePos_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UpdatePos.Click 

   ‘BOAPI is predefined variable as CVertexBOAPI  

   Dim Result as CallingResultsEnum
   Dim vpos as COOpenposition
   vpos= BOAPI.OpenPositionByIndex (1)
   vSymbol = BOAPI.symbolByIndex (1)
   Result = BOAPI.UpdateOpenPosition(vpos.Ticket, 1, vpos.Price, 1 , vpos.Interest, "Update open position 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