Knowledgebase: > Events
Posted by Mohammad Rahhal, Last modified by Diana Alkouni on 09 September 2020 10:04 AM


 Event ClosePosResult(ByRef Result As NewOrderResultEnum, ByRef OpenTicket As Integer, TransTag as String , CloseTicket As Integer)


This event fires after calling the ClosePosition method, with server response result.


Part Description 
Result Server response result for the closing position of type NewOrderResultEnum
OpenTicket Associated position number that had been closed, a value of type integer.
TransTag The same string that was sent by ClosePosition method, a value of type string
CloseTicket The closed ticket number if the result not succeeded it will return 0, a value of type is Integer 



 Public WithEvents m_oBOAPI As CVertexFXBOAPI 

 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


        Dim result As VertexFXBOAPI11.CallingResultsEnum
     Dim vAccount As COAccount
     Dim vClient As COClient
     Dim vSym As COSymbol
     Dim Pos As COOpenPosition
     Dim AccountID As Integer
     vSym = m_oBOAPI.SymbolByIndex(1,True)
     vClient = m_oBOAPI.ClientByIndex(1)
     vAccount = m_oBOAPI.AccountByIndex(vClient.ClientID,1)
     AccountID = vAccount.AccountID 
     Pos = m_oBOAPI.OpenPositionByIndex(1)


     result = m_oBOAPI.ClosePosition(AccountID, Pos.Ticket, Pos.Lots, Pos.Price, Pos.RefAskPrice, 0, Pos.RefBidPrice,"TransTag","")




 End Sub

 Private Sub m_oBOAPI_ClosePosResult(ByRef Result As VertexFXBOAPI11.NewOrderResultEnum, ByRef OpenTicket As Integer, TransTag as String) Handles m_oBOAPI.ClosePosResult


 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