Skip to content

TradeRecord

TableRecord

Field Type Description
order int Unique order identifier (ticket)
login int Account owner ID
symbol std::string Symbol of the trading instrument (e.g., "EURUSD")
digits int Number of decimal places in the quote
cmd int Order type (see enum OP_*)
volume int Order volume (lot size, in minimal lots / 100)
open_time time_t Order open time (UNIX timestamp)
state int Current order state (see enum TS_*)
open_price double Order open price
sl double Stop Loss level
tp double Take Profit level
margin_initial double Initial margin for the order
close_time time_t Order close time (if closed)
gw_volume int Volume executed through external gateway
expiration time_t Expiration time (for pending orders)
reason int Reason for order creation (see enum TR_REASON_*)
conv_rates std::array Conversion rates (profit currency to deposit currency):
conv_rates[0] - at open,
conv_rates[1] - at close
commission double Deal commission
commission_agent double Agent (IB) commission
storage double Swap (overnight fee)
close_price double Order close price
profit double Total profit/loss
taxes double Taxes
magic int Magic number (EA identifier)
comment std::string Order comment
gw_order int Order number in external gateway
activation int Order activation type (see enum ACTIVATION_*)
gw_open_price short Open price in external gateway
gw_close_price short Close price in external gateway
margin_rate double Margin rate (margin currency to deposit currency conversion)
api_data std::string Data for API integration
timestamp time_t Last update timestamp