Knowledgebase:
UpdateOpenPosition
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 07 May 2017 12:18 PM

Syntax

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

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

Parameters

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.

Sample

 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))
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