Syntax
Public Function UpdateLimitOrder(OrderID As Integer , Lots As Double, NewPrice As Double, Optional SL As Object = "", Optional TP As Object = "", Optional Note As String = "", Optional TransTag As String = "") As CallingResultsEnum
Description
This function is used for updating a limit order.A user account must be selected before using this method.After UpdateLimitOrder method executes the UpdateLimitOrderResult event fire
Parameters
Part |
Description |
OrderID |
Associated order number that want to update it,value of type Integer |
Lots |
Amount of lots,value of type Double. |
NewPrice |
Updating price,value of type Double. |
SL |
Stop loss amount,optional object. |
TP |
Take profit amount ,optional object. |
Note |
Custom string used to mark the taken orders . |
TransTag |
String value is used to mark the update limit order operation when the result came from the server. |
Retrun value
Returns value of type CallingResultsEnum, if the request sent to the server successfully it will return SuccessResult.
Sample
Public WithEvents m_oBOAPI As CVertexFXBOAPI
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim result As CallingResultsEnum
Dim vOrder As COOrder = m_oBOAPI.OrderByIndex(1)
result = m_oBOAPI.UpdateLimitOrder(vOrder.OrderID,vOrder,Lots,vOrder.LimitPrice,"","","Update limit")
MsgBox(Result.ToString)
End Sub
Private Sub m_oBOAPI_UpdateLimitOrderResult(ByRef Result As VertexFXBOAPI10.NewOrderResultEnum, ByRef OrderID As Integer, ByRef ServerTime As String) Handles m_oBOAPI.UpdateLimitOrderResult
MsgBox(Result.ToString)
End Sub
See Also
VertexFX Backoffice API Index
|