PrintOrderDetails

Prints the details of the currently selected order to the strategy log.

Syntax

PrintOrderDetails(): void

Return Value

This method does not return a value.

Description

The PrintOrderDetails method outputs comprehensive information about the currently selected order to the strategy log. This is particularly useful for debugging, tracking order execution, and validating trade management logic.

The printed information typically includes:

  • Ticket number

  • Symbol (currency pair)

  • Order type (buy or sell)

  • Volume (lot size)

  • Open price

  • Current market price

  • Stop loss level

  • Take profit level

  • Open time

  • Commission

  • Swap

  • Profit in currency

  • Profit in pips

  • Comment

  • Magic number

Before using this method, you must first select an order using the SelectOrder method.

Example

Notes

  • An order must be selected first using SelectOrder before calling this method.

Last updated