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 hedgeAfter CloseByHedge method executes the CloseByHedgeResultReceived event fires.


Parameter Description 
Ticket1 The first ticket number to be closed by hedge , value of type Integer.
Ticket2 The second ticket numbert to be closed by hedge , value of type Integer
Amount The amount  of lot 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.


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

   Dim Result As CallingResultsEnum

   Dim Pos1 As VertexFXClientAPI10.COOpenPosition

   Dim Pos2 As VertexFXClientAPI10.COOpenPosition

   Pos1 = API.OpenPositionByIndex(1)

   Pos2 = API.OpenPositionByIndex(2)

   Result = API.CloseByHedge(Pos1.Ticket,Pos2.Ticket,Pos1.Lots)


End Sub 

See Also

VertexFX Client 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