GetExtendedOrderDetails

Returns comprehensive details of an order.

Syntax

GetExtendedOrderDetails(orderHandle: number): TTradePosInfo

Parameters

  • orderHandle: The ticket number of the order to get details for. This can be obtained using the GetOrderTicket method for the currently selected order.

Return Value

Returns a TTradePosInfo object containing the following properties:

  • ticket: Order ticket number

  • openTime: Time when the order was opened

  • closeTime: Time when the order was closed

  • posType: Position type (buy or sell)

  • lot: Order volume in lots

  • symbol: Symbol (currency pair) of the order

  • openPrice: Price at which the order was opened

  • closePrice: Price at which the order was closed

  • stopLoss: Stop loss level

  • takeProfit: Take profit level

  • commission: Commission fees

  • swap: Accumulated swap

  • profit: Profit/loss in account currency

  • profitPips: Profit/loss in pips

  • comments: Order comments

  • margin: Margin required for the order

  • hedgedMargin: Hedged margin

  • magicNumber: Magic number associated with the order

Description

The GetExtendedOrderDetails method returns a structured object with comprehensive details about the specified order.

Example

Notes

  • You must provide a valid order ticket number (handle) to this method.

Last updated