Knowledgebase:
UpdateLimitOrder
Posted by Rula Halaseh, Last modified by Rawan Al Hourani on 05 February 2018 01:32 PM

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

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

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions