Syntax
Function CloseByHedge(ByRef Ticket1 As Integer, ByRef Ticket2 As Integer, ByRef Amount As Double) As CallingResultsEnum
Description
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
|