op_buy, op_buy_limit, op_buy_stop, what's the different and flow?

 

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()?

 

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.