Syntax
Public Function UpdateLimitOrder(ByRef OrderId As Integer, ByRef Lots As Double, ByRef NewPrice As Double, [ByRef SL As Object = ""], [ByRef TP As Object = ""],[ByRef TransTag As String =""],[ByRef Note As String =""]) As CallingResultsEnum
Description
This function is used to update the given limit order identifier. After UpdateLimitOrder method executes the UpdateLimitOrderResult event fires.Before using this method, an account must be selected by SelectAccount method.
Parameters
Part |
Description |
OrderID |
Associated Limit order number to be updated, the value of type Integer. |
Lots |
Amount of lots, the value of type Double. |
NewPrice |
Updated price value, value of type Double. |
SL |
Stop loss amount ,optional value. |
TP |
Take profit amount, optional value. |
TransTag |
String value to mark updated limit order when the result came from server, optional value. |
Note |
Comment of type string, in order to bypass the auto broker for both real/demo clients you can put the following token#$CHAT$# in the note field. Even if AUTO BROKER is on, with this tag in the comment order will be sent to the dealing room "CHAT SCREEN" and handled by dealers according to the dealing room regular configuration, optional value. |
Return value
Returns value of type CallingResultsEnum.If the request sent to the server successfully it will return SuccessResult
Sample
Private Sub Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn.Click
Dim result As VertexFXClientAPI10.CallingResultsEnum
'API is a predefined variable as CVertexFXClientAPI10
Dim Order As COOrder = API.OrderByIndex(1)
result = API.UpdateLimitOrder(Order.OrderID,Order.Lots,Order.LimitPrice,"", "","TransTag","Note")
MsgBox("Update Limit Order Result : " & result.Tostring)
End Sub
See Also
VertexFX Client API Index
|