Download MetaTrader 5
To add comments, please log in or register
All articles are available from MetaTrader 5. Contribute your own one!
Filip
105
Filip 2013.01.01 20:44 

Dear Forum,


Im traying to handle my placed orders, as I found in many threads usually it is handled by the following loop :


for(int i=0;i<OrdersTotal();i++)

      if((order_ticket=OrderGetTicket(i))>0)

...



The Problem is, that my OrdersTotal() call allways returns zero.


Does anyone know why this happens?


Thanks for help,


Filip



Filip
105
Filip 2013.01.01 22:46  

i Got it... the code posted in this thread : https://www.mql5.com/en/forum/5009 is working like a charme for me ;)


regards,


Filip

How to delete pending order?
How to delete pending order?
  • www.mql5.com
If there is an open order and a pending order, I want to delete this pending order.
phi nuts
2185
phi nuts 2013.01.02 02:38  

Oh that. Good for you that it help you.

By the way,

1. For next time, would you please use SRC button to post the codes, it will make much easier for others who trying to help you, reads your codes.

 

2. In MT5/mql5, there are differences when we call position, orders and deal. Please read this article for clarity : Orders, Positions, and Deals in MetaTrader 5.

/
To add comments, please log in or register