Syntax
Public Function CloseAllByHedge(AccountID As Integer, BuyTickets As String, SellTickets As String, BuyLots as String, SellLots as String, SymbolID as Integer) CallingResultsEnum
Description
The CloseAllByHedge function is used to close the given tickets numbers(Sell and buy tickets) by hedge for a specific symbol, After CloseAllByHedge method executes the CloseByHedgeResultReceived event fire.
Parameters
Parameter |
Description |
AccountID |
Account number to close tickets by hedge for , value of type is Integer. |
BuyTickets |
The Tickets number for the buy position separated by ",", value of type is String |
SellTickets |
The Tickets number for the Sell position separated by ",", value of type is String |
BuyLots |
The lots value for the buy position separated by "," , value of type is String |
SellLots |
The lots value for the sell position separated by "," , value of type is String |
SymbolID |
Symbol number for the positions that wants to closed it by hedge, Value of type is Integer |
Return value
Returns value of type CallingResultsEnum, if the request sent to the server successfully it will return SuccessResult.
Sample
Public WithEvents API As CVertexFXClientAPI
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim result As CallingResultsEnum
Dim AccountID as Integer = "1234567" 'Change it with your accountID
Dim BuyTickets as String = "695487,695488"
Dim SellTickets as String = "695470,695471"
Dim BuyLots as String = "0.1,0.1"
Dim SellLots as String = "0.1,0.1"
result API.CloseAllByHedge(AccountID, BuyTickets, SellTickets, BuyLots, SellLots,6)
MsgBox(result.ToString)
End Sub
See Also
VertexFX Client API Index
|