Public Overrides Function NewLimitOrder(LOType As VertexFXBridgeLPAPI.LimitOrderType, Amount As Double, LPSymbolName As String, Price As Double, LPAccountID As String, BOOrderID As String,Optional ByVal SL As Double = 0,Optional ByVal TP as Double = 0) As VertexFXBridgeLPAPI.TransResult
This function should make new limit order with the LP, this will return an object of type TransResultthat represnts a fail or success result. If success, the bridge will expect calling either:
MyBase.OrderState.LimitOrderAccepted
or
MyBase.OrderState.LimitOrderRejected
Parameters
Part | Description |
LOType | Buy Limit or Sell Limit, of type LimitOrderType |
Amount | Amount to be traded |
LPSymbolName | Symbol name |
Price | make limit order at this price |
LPAccountID | Account ID |
BOOrderID |
This ID should be returned when you receive the server response for the order in calling: MyBase.OrderState.LimitOrderAccepted or MyBase.OrderState.LimitOrderRejected For more info check Limit Order Cycle |
SL | Optional value for stop loss |
TP | Optional value for take profit |
Sample
Public sub main () Dim Result As VertexFXBridgeAPI.TransResult Dim liType As VertexFXBridgeAPI.LimitOrderType Result=LP.GetLPs.Item(1).LP.NewLimitOrder (liType.BuyLimit,1, "GOLD", 10, 2100, "12345", "786320",,) End Sub
See Also