ordertype() in mql5 ?
https://www.mql5.com/en/docs/constant_indices
look at this. you will get the answer.
- www.mql5.com
Hi
Here there are separate enum values for deals. orders and positions in mt5.
You should use proper ones for each of them, for example you should use:
ENUM_POSITION_TYPE postype=PositionGetInteger(POSITION_TYPE) – and you can get Buy or Sell only
When you check the type for orders:
ENUM_ORDER_TYPE ordtype = OrderGetInteger(ORDER_TYPE);
you will get the types as in mt4 - but this will work only for orders.
You can also get deal type: HistoryDealGetInteger(deal_ticket,DEAL_TYPE)
Have a nice weekend