In MQL4 all open and pending orders are grouped together, so they will all be counted by OrdersTotal().
When a pending order is triggered, it will then be either an OP_BUY or OP_SELL.

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
I just found out about op_buy_limit and op_buy_stop. In my current understanding op_buy_limit and op_buy_stop fall under pending order, but it is listed as position that I have when I iterated OrdersTotal(). So this make me confuse about mechanic behind it. If I want to find out, just opened position that i have, does those who fall under buy limit or buy stop category also an open position? if it's a pending order, does if parameter met, it will delete itself and add an op_buy in the OrdersTotal()?