How to select all open orders?

 

Hi every body

I am a new mql4 programmer. please help me

How can I select all open orders (for example 5) and close all of them immidiately?

Thanks for your cooperation

 

this is the indicator for close all open position

Files:
 
close all pending
 
close all open and pending
 

but u must wait some second for that all position that be closed.. because in mt4 only can close one by one, can not direct all.. so maybe 1 position need 1 seconds or based of your connection speed..

not like in the marketiva that can close all directly...

thx..