Public Function RequestManageOrders(ticket As Long) As Boolean
This function is used to request all managed orders that related to specific position from the server. To get result from the server, you have to consume OnManageOrdersReceived event.
||Position ticket number which has manage orders, a value of type Long.
Returns true if successful. Otherwise, returns false. In order to get an error, call GetlastError() function.
Public Sub main()
If AccountInfoInteger(ACCOUNT_LOGIN) Then
If RequestManageOrders (PositionTicket) Then
AlertMessage "The Request has been sent to the server to get all manage orders related to PositionTicket "
'This event raised when calling RequestManageOrders method successfully
Public Sub OnManageOrdersReceived(manageOrders)
' Receiving Manage Order related to PositionTicket
For i = 1 To manageOrders.Count()
AlertMessage CSTR(manageOrders. Orders(i))
Back to VTL Client Script Index