How to find out if a ticket is closed?

 
Hello everyone. Is there any solution to know if a ticket is already closed without having to iterate all open positions?
 
If you have the ticket and the position is not open, it must be closed (otherwise you won't have a ticket no.) check PositionSelectByTicket(ticket#). if true it's open and accessible otherwise it must be closed.
 
bool isClosed = OrderCloseTime() != 0;
 
William Roeder #:
Thanks