Documentation
MQL5 ReferenceTrade FunctionsHistoryOrdersTotal 

HistoryOrdersTotal

Returns the number of orders in the history.

int  HistoryOrdersTotal();

Return Value

Value of the int type.

Note

Do not confuse orders of a trading history with current pending orders that appear on the "Trade" tab of the "Toolbox" bar. The list of orders that were canceled or have led to a transaction, can be viewed in the "History" tab of "Toolbox" of the client terminal. The size of 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(), HistoryOrderSelect(), HistoryOrderGetTicket(), Order Properties