HistoryOrderSelect
Selects an order from the history for further calling it through appropriate functions. It returns true if the function has been successfully completed. Returns false if the function has failed. For more details on error call GetLastError().
bool HistoryOrderSelect( |
Parameters
ticket
[in] Order ticket.
Return Value
Returns true if successful, otherwise false.
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.
The HistoryOrderSelect() function works with a timeout. If the requested data are already available, they are given immediately without waiting. Otherwise, the preparation of the requested data may take a fixed timeout of 3 seconds. Once the data are received, the function immediately stops and returns the result.
In most cases the result of the function execution will be given immediately and without any delay, but during re-connections, the specified timeout of 3 seconds provides the necessary time to wait for an update.
HistoryOrderSelect() clears in a mql5-program the list of orders from a history, available for calls, and copies to it a single order, if the execution of HistoryOrderSelect () has been completed successfully. If you need to go through all deals selected by HistorySelect(), you should better use HistoryOrderGetTicket().
See also
HistorySelect(), HistoryOrderGetTicket(), Order Properties
© 2000-2010, MetaQuotes Software Corp.