Public Function CloseAllByHedge(AccountID As Integer, BuyTickets As String, SellTickets As String, BuyLots as String, SellLots as String, SymbolID as Integer) CallingResultsEnum
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.
||Account number to close tickets by hedge for , value of type is Integer.
||The Tickets number for the buy position separated by ",", value of type is String
||The Tickets number for the Sell position separated by ",", value of type is String
||The lots value for the buy position separated by "," , value of type is String
||The lots value for the sell position separated by "," , value of type is String
||Symbol number for the positions that wants to closed it by hedge, Value of type is Integer
Returns value of type CallingResultsEnum, if the request sent to the server successfully it will return SuccessResult.
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)
VertexFX Client API Index