The fnGetHistoryInfo is used to get information about the last closed trade on the account.






Parameters on the Configuration Tab


The following table provides information about each parameter of the fnGetHistoryInfo function.


InfoType

The type of information requested (that matches the Order Selection criteria):


INFO_LOTS:Get the lot size of the last closed order.

INFO_MAGICNUMBER :Get the magic number of the last closed order.

INFO_OPENPRICE :Get the open price of the last closed order.

INFO_CLOSEPRICE :Get the closed price of the last closed order.

INFO_OPENTIME :Get the open time of the last closed order.

INFO_CLOSETIME :Get the close time of the last closed order.

INFO_PROFIT :Get the profit of the last closed order. (this value can be negative)

INFO_STOPLOSS :Get the stoploss of the last closed order.

INFO_TAKEPROFIT :Get the takeprofit of the last closed order.

INFO_SWAP :Get the swap value of the last closed order.

INFO_TICKET :Get the ticket of the last closed order.

INFO_ORDERTYPE :Get the order type of the last closed order.


Order Selection

Determines what orders of the Account are queried.

  • All: all open orders on the account.
  • Symbol: only open orders matching the selected symbol.
  • Order Type: only open orders of the selected order type.
  • MagicNumber: only open orders with a matching magicnumber.
  • Exact Ticket: only open orders with the matching order ticket.


Note: Selecting Exact Ticket disables all other selection criteria.