img

Object History - access to the history of positions

History object provides access to the information on closed positions.

bool Select(int64 sel,int mode)

Selects positions for future reference to its properties

Parameters:

  • int64 sel - ID or a position of a closed deal, depending on selection mode
  • int mode - Deal selection mode

History object properties:

  • int64 ID - unique deal ID
  • string Symbol - deal symbol
  • uint16 Direction - deal direction
  • double Volume - deal volume
  • datetime OpenTime - open time
  • float OpenPrice - open price
  • datetime CloseTime - close time
  • float ClosePrice - close price
  • float SL - stop loss
  • float TP - take profit
  • double Swap - swap
  • double Profit - closed position profit/loss

int Total

Property indicates the number of closed positions saved in the history