Public Function DeleteOpenPosition(Ticket As Integer, AccountID As Integer) As CallingResultsEnum
This function is used to delete an existing position. After DeleteOpenPosition method is executed, the DeleteOpenPositionResult event will fire.
||Position ticket number to be Deleted, value of type is Integer
||Account number that want to delete its open position, value of type is Integer
Returns value of type CallingResultsEnum ,if the request sent to the server successfully it will return SuccessResult.
Private Sub DeletePos_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeletePos_Click
‘BOAPI is predefined variable as CVertexBOAPI
Dim Result as CallingResultsEnum
Dim vpos as COOpenposition
Dim vAccount as COAccount
vAccount = BOAPI.AccountByIndex (1)
vpos= BOAPI.OpenPositionByIndex (1)
Result = BOAPI.DeleteOpenPosition (vpos.Ticket , vAccount.AccountID)
VertexFX Backoffice API Index