What return value to OrderType() ? If this ticket number already closed .
SELECT_BY_TICKET you don't need MODE_TRADES, it selects the ticket from live and history together.Only in SELECT_BY_POS you should inform MODE_TRADES or MODE_HISTORY.
So, for select ticket you get the original order type, no matter if the deal is closed or open
To add comments, please log in or register