Documentation
MQL5 ReferenceTrade FunctionsHistoryDealsTotal 

HistoryDealsTotal

Returns the number of deal in history.

int  HistoryDealsTotal();

Return Value

Value of the int type.

Note

Do not confuse orders, deals and positions. Each deal is the result of the execution of an order, each position is the summary result of one or more deals. The list of orders and deals displayed in the "History" tab, depends on the depth of history that can be set manually or using the HistorySelect() function.

See also

HistorySelect(), HistoryDealGetTicket(), Deal Properties