Knowledgebase: > Methods
Posted by Mohammad Rahhal, Last modified by Diana Alkouni on 01 September 2020 01:13 PM


Function CloseByHedge(ByRef Ticket1 As Integer, ByRef Ticket2 As Integer, ByRef Amount As Double) As CallingResultsEnum


This function closes specific amount of two tickets by hedge.After CloseByHedge method executes the CloseByHedgeResultReceived event fire.


Parameter Description 
Ticket1 The first ticket number that will be closed by hedge.Value of type is Integer.
Ticket2 The second ticket number that will be closed by hedge.Value of type is Integer.
Amount A lot of amount that will be closed.Value of type Double.

Return value 

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


 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 VertexFXBOAPI10.CallingResultsEnum
     Dim Pos As COOpenPosition
     Dim Pos1 As COOpenPosition
     Pos = m_oBOAPI.OpenPositionByIndex(1)
     Pos1 = m_oBOAPI.OpenPositionByIndex(2)

     result = m_oBOAPI.CloseByHedge(Pos.Ticket, Pos1.Ticket,pos.Lots)


 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