|
HistorySelect
Retrieves the history of deals and orders for the specified period of server time.
bool HistorySelect(
|
Parameters
from_date
[in] Start date of the request.
to_date
[in] End date of the request.
Return Value
It returns true if successful, otherwise returns false.
Note
HistorySelect() creates a list of orders and a list of trades in a mql5-program, for further referring to the list elements using corresponding functions. The deals list size can be returned using the HistoryDealsTotal() function; the size of the list of orders in the history can be obtained using HistoryOrdersTotal(). Selection in the list of orders should be better performed by HistoryOrderGetTicket(), for items in the list of deals HistoryDealGetTicket() suits better.
After using HistoryOrderSelect(), the list of history orders available to the mql5 program is reset and filled again by the found order, if the search of an order by the ticket has been completed successfully. The same applies to the list of deals available to the mql5 program - it is reset by HistoryDealSelect() and filled again in case of a successful receipt of a deal by ticket number.
Example:
void OnStart()
|
See also