Syntax
Public Overrides Function CloseByHedge(ByVal LPOrderID1 As String, ByVal LPOrderID2 As String, ByVal BuySell1 As OperationType, ByVal BuySell2 As OperationType, ByVal Amount As Double, ByVal LPSymbolName As String, ByVal LPAccountID As String, ByVal BOOrderID1 As String, ByVal BOOrderID2 As String, ByVal BOAccountID As String) As TransResult
Description
This function used to close two market order positions with specific amount at the LP and return the object of type TransResult,if return success result the bridge will expect calling MyBase.OrderState.MarketOrderClosedByHedge, otherwise the bridge expects to call MyBase.OrderState.MarketorderClosingByHedgeFailed.
Parameters
Key | Description |
LPOrderID1 | The first order number on LP side to be closed by hedge, Value of type String |
LPOrderID2 | The second order number on LP side to be closed by hedge, Value of type String |
BuySell1 | The first order operation type, Value of type OperationType |
BuySell2 | The second order operation type, Value of type OperationType |
Amount | The amount of lot to be closed, value of type Double |
LPSymbolName | The orders symbol name to be closed, value of type String |
LPAccountID | LP account number to be closed orders on it, value of type String |
BOOrderID1 | The first order number on BackOffice side, Value of type String |
BOOrderID2 | The second order number on BackOffice side, Value of type String |
BOAccountID | BackOffice account number, value of type String |
Remarks
Above parameters should be returned when you receive the server response for the order in calling MyBase.OrderState.MarketOrderClosedByHedgeor MyBase.OrderState.MarketorderClosingByHedgeFailed.
For more information check Close By hedge Cycle.
See Also