Deleting or closing a pending buylimit
I am having issues with deleting or closing a pending buylimit. here is my coding what am I doing wrong? its probably simple
- delete pending orders
- HELPPPPP!!!!!! trying to close pending orders
- why expert closes trade at price 0.00000 ?
for(int b= OrdersTotal()-1; b >= 0; b--) { if(OrdersTotal() == 0) CloseBuyStack1stLevelLimitOrder1M(); }
If OrdersTotal() is zero the for loop will do nothing. If OrdersTotal() is nonzero the last if statement will always be false. Either way nothing happens.
- Check your return codes and find out why. What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles