Hello,
when i call this function with a ticket of a pending order
it prints status pending and status closed to console. Shouldn't OrderSelect(...MODE_HISTORY) return false ?
Thank you
No, when you select by ticket the mode is ignored.
From the documentation
"The pool parameter is ignored if the order is selected by the ticket number. The ticket number is a unique order identifier."
No, when you select by ticket the mode is ignored.
From the documentation
"The pool parameter is ignored if the order is selected by the ticket number. The ticket number is a unique order identifier."
Yes unique number, but argument is not clear to me. How to know, if order is filled or not ?
you may check order type in the closed or deleted
or ( not certain solution ) check order profit in the history if it was different from zero it might be filled order ( not pending )
To check when a Pending Order is triggered and becomes a market order, check the OrderType() to see if it has become a OP_BUY or an OP_SELL!
For a closed order, check the close time ( OrderCloseTime() != 0 ).
- docs.mql4.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
when i call this function with a ticket of a pending order
it prints status pending and status closed to console. Shouldn't OrderSelect(...MODE_HISTORY) return false ?
Thank you