Syntax
Public Function RequestManageOrders(ticket As Long) As Boolean
Description
This function is used to requestall 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