Syntax
Public Overrides Function NewSLTPOrder(Ticket As String, Amount As Double, Optional SL As Object =0, Optional TP As Object =0,Optional ByVal AccountID As String = "" ) As VertexFXBridgeAPI.TransResult
This function should create SLTP orders with the LP, this will return an object of typeTransResultthat represnts a fail or success result.
Parameters
Key | Description |
Ticket | Ticket ID of type string |
Amount | Amount to be traded |
SL | Stop Loss |
TP | Take Profit |
AccountID | Optional value for account ID |
Sample
Public Sub LPMarketOrderAccepted (ByVal LP As VertexFXBridgeAPI.VertexFXLP, ByVal LPOrderID As String, ByVal CoveredPrice As Double, ByVal LPTicketID As String) Dim Result As VertexFXBridgeAPI.TransResult Result=LP.GetLP("Description").NewSLTPOrder ("723210",1,1, 2,"") End Sub
See Also