Public Overrides Function NewMarketOrder(ByVal BuySell As OperationType, ByVal Amount As Double, ByVal LPSymbolName As String, ByVal LPAccountID As String, ByVal BOOrderID As String) As TransResult
This function should make new market order with the LP. This will return an object of typeTransResultthat represnts a fail or success result. If success, the bridge will expect calling either:
MyBase.OrderState.MarketOrderIDReceived
or
MyBase.OrderState.MarketOrderFailed
Parameters
Part | Description |
BuySell | Buy or Sell |
Amount | Amount to be traded |
LPSymbolName | Symbol name |
LPAccountID | Account ID |
BOOrderID |
This ID should be returned when you receive the server response for the order in calling: MyBase.OrderState.MarketOrderIDReceived or MyBase.OrderState.MarketOrderFailed For more info check Market Order Cycle |
Sample
Public sub main () Dim Result As VertexFXBridgeAPI.TransResult Dim maType As VertexFXBridgeAPI.MarketOrderType Result=LP.GetLP ("Description"). NewMarketOrder (MaType.Buy,1, "GOLD", 10, "12345", "786320") End Sub
See Also