I mean whether we can get all the information about the orders which have been closed, such as how the orders are closed, by "stop loss " or by OrderClose(), if we can, which functions should be used?
any function starting with Order.
AFAIK, there's no function that tells you how an order was closed. You just have to keep a record if your EA does it (if not, it was stoploss). You can also check if OrderStoploss vaguaelly equals OrderClosePrice