Download MetaTrader 5
MQL5 ReferenceTrade FunctionsHistoryOrdersTotal 

HistoryOrdersTotal

Returns the number of orders in the history. Prior to calling HistoryOrdersTotal(), first it is necessary to receive the history of deals and orders using the HistorySelect() or HistorySelectByPosition() function.

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.

See also

HistorySelect(), HistoryOrderSelect(), HistoryOrderGetTicket(), Order Properties


Updated: 2015.12.03