Syntax
Public Function ManualUpdateOpenPosition(AccountID as Integer, TicketID As Integer, NewLots As Double, NewPrice As Double, NewType As OperationTypeEnum, NewInterest As Double , NewComment As String) as CallingResultsEnum
Description
The manual update open position is used to update specific ticket number without select an account , After ManualUpdateOpenPosition method is executed the ManualUpdateOpenPosition event will fire.
Parameters
Parameters |
Description |
AccountID |
Account number to close tickets by hedge for , value of type is Integer |
TicketID |
Ticket number 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 |
NewInterest |
The new comment value of type is String |
Return value
Returns value of type CallingResultsEnum, if the request sent to the server successfully it will return SuccessResult.
Sample
Private Sub UpdatePos_Click (ByVal sender As System.Object, ByVale As System.EventArgs)Handles UpdatePos.Click
‘BOAPI is predefined variable as CVertexBOAPI
Dim Result as CallingResultsEnum
Dim vpos as COOpenposition
vpos= BOAPI.OpenPositionByIndex (1)
Result = BOAPI.UpdateOpenPosition("1234567",vpos.Ticket, 1, vpos.Price, 1 , vpos.Interest,"Update open position BOAPI")
Msgbox (Result.ToString)
End sub
See Also
VertexFX Backoffice API Index
|