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

Syntax

Public Function RequestManageOrders(ticket As Long) As Boolean

Description

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.

Parameters

Key Description 
Ticket Position ticket number which has manage orders, a value of type Long.

Return value
Returns true if successful. Otherwise, returns false. In order to get an error, call GetlastError() function.

Sample

Public Sub main()

  Dim PositionTicket
   If AccountInfoInteger(ACCOUNT_LOGIN) Then
     PositionTicket=PositionGetTicket(1)
     If RequestManageOrders (PositionTicket) Then
         AlertMessage "The Request has been sent to the server to get all manage orders related to                                      PositionTicket "
    Else
        Alertmessage  ErrorDescription(GetLastError())
    End If 
  End If 

End Sub

'This event raised when calling RequestManageOrders method successfully 

  Public Sub OnManageOrdersReceived(manageOrders)

    Dim i

' Receiving Manage Order related to PositionTicket 

   For i = 1 To manageOrders.Count()
        AlertMessage CSTR(manageOrders. Orders(i))
    Next

  End Sub

 


See Also


Back to VTL Client 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