UpdateLimitOrder
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 20 October 2016 12:59 PM

Syntax

Public Function UpdateLimitOrder(ByVal OrderId As Integer, ByVal Lots As Double, ByVal NewPrice As Double, Optional ByVal SL As Object = "", Optional ByVal TP As Object = "",Optional ByVal Note As String = "") As CallingResultsEnum

This function used to update the pending order with new priceAfter UpdateLimitOrder method executes the UpdateLimitOrderResult event fires.
To get result from the server after accepted the order you have to consume OnOrderTrade event.

Parameters

Parameter  Description 
OrderID Order number to be updated, value of type Integer.
Lots Amount of lots , value of type Double.
NewPrice the updated price, value of type Double.
TP Take profit, optional value of type Double.
SL Stop loss, optional value of type Double.
Note To add note to comment field on trade list .

Return value

Returns value of type CallingResultsEnumIf the request sent to server successfully it will return SuccessResult

Sample

   Public Sub Main () 

       Dim Result as VTLGeneral.callingResultsEnum

      Dim Order_ as VTLGeneral.Order             

      Order_= ClientCode.OrderByIndex(1)

      Result = ClientCode.UpdateLimitOrder (Order_.OrderID, Order_.lots, Order_.limitprice,"","","")

      GUI.MsgDialog(Result) 

   End Sub


See Also


Back to VTL Server Script 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