help with closing orders

 
Is there a function in MetaTrader that closes all orders that are open and pending?
 
No, you will need to code something. Have a read of some of the threads here: http://crum.be/close
Reason: