GetOrderDetails
Returns detailed information about an order.
Syntax
GetOrderDetails(orderHandle: number): TTradePosInfoParameters
orderHandle: The ticket number of the order to get details for. This can be obtained using theGetOrderTicketmethod for the currently selected order.
Return Value
Returns a TTradePosInfo object containing the following properties:
ticket: Order ticket numberopenTime: Time when the order was openedcloseTime: Time when the order was closedposType: Position type (buy or sell)lot: Order volume in lotssymbol: Symbol (currency pair) of the orderopenPrice: Price at which the order was openedclosePrice: Price at which the order was closedstopLoss: Stop loss leveltakeProfit: Take profit levelcommission: Commission feesswap: Accumulated swapprofit: Profit/loss in account currencyprofitPips: Profit/loss in pipscomments: Order commentsmargin: Margin required for the orderhedgedMargin: Hedged marginmagicNumber: Magic number associated with the order
Description
The GetOrderDetails method returns a structured object with detailed information about the specified order. This provides a convenient way to access multiple order properties at once without making several individual method calls.
Example
Notes
You must provide a valid order ticket number (handle) to this method.
Last updated