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
amir_avatar: you get the original order type, no matter if the deal is closed or open
| If the original order type was a pending order and it opened, it's now a buy or sell. |
sorasit46:OrderSelect SELECT_BY_TICKET If this ticket number already closed | When you select by ticket, mode is irrelevant. If you don't know if it's closed, you can check OrderCloseTime() for non-zero. |
Thank you
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
OrderSelect(Ticket,SELECT_BY_TICKET,MODE_TRADES);
What return value to OrderType() ? If this ticket number already closed .
thank you