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

Syntax

 Public Function UpdateSLTPOrder(OrderID As Long, Lots As Double, Optional SL As Object = "", Optional TP As Object = "", Optional TransTag As String = "") As CallingResultsEnum

This function is used to update SL/TP order. A user account must be selected before using this method. After UpdateSLTPOrder method executes the UpdateSLTPOrderResult event fire

Parameters

Part Description 
OrderID Associated order number to update,value of type Integer
Lots Amount of lots,value of type 
SL Stop loss amount ,optional object
TP Take profit amount,optional object
TransTag String value is used to mark the update SLTP order operation when the result came from the server.

Return 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.UpdateSLTPOrder(vOrder.OrderID, vOrder.Lots, vOrder.SL, vOrder.TP)

 End Sub

 Private Sub m_oBOAPI_UpdateSLTPOrderResult(ByRef Result As VertexFXBOAPI10.NewOrderResultEnum, ByRef OrderID As Integer, ByRef ServerTime As String) Handles m_oBOAPI.UpdateSLTPOrderResult

        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