Knowledgebase:
CloseByHedge
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 07 May 2017 02:53 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 fire.

Parameters

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.

Sample

 
 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)

     MsgBox(result.ToString)

 End Sub


See Also


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