Posted by Mohammad Rahhal, Last modified by Diana Alkouni on 02 September 2020 10:11 AM


Public Function UpdateSLTPOrder(ByVal OrderId As Integer, ByVal Lots As Double, Optional ByVal SL As Object = "", Optional ByVal TP As Object = "") As CallingResultsEnum


This function used to update the existing manage order at specific open position ,After UpdateSLTPOrder method executes the UpdateSlTPOrderResult 
event fires.To get result from the server after accepted the order you have to consume OnOrderTrade event


Parameter  Description 
OrderID Order number to be updated, value of type Integer.
Lots Amount of lots , value of type Double.
TP Take profit, optional value of type Double.
SL Stop loss, optional value of type Double.

Return value

Returns value of type CallingResultsEnum. If the request sent to the server successfully it will return SuccessResult.


 Public Sub Main () 

   Dim Result as VTLGeneral.callingResultsEnum

   Dim Order_ as VTLGeneral.Order              

   Order_= ClientCode.OrderByIndex (1)

    If not Order_ is nothing then 

       Result = ClientCode.UpdateSLTPOrder (Order_.OrderID, Order_.lots, Order_.SL, Order_.TP)



      GUI.MsgDialog("There is no order")
  end if  

   End Sub

See Also

Back to VTL Server Script Index

(0 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
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