Knowledgebase:
CloseByHedge
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 21 May 2017 01:16 PM

Syntax

 Function CloseByHedge(ByRef Ticket1 As Integer, ByRef Ticket2 As Integer, ByRef Amount As DoubleAs CallingResultsEnum

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

Parameters

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.

Sample

Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles 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)

   MsgBox(Result)


End Sub 


See Also


VertexFX Client API Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
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