Little help on EA

 

Hi there, i need a little help on condicions: 

 

lets say i have 2 buy stop and 2 sell stops wainting

when the buy stops activate and became buy, it well delete the sell stops remaing, but if only one buy stop became active it will do nothing. 

my difficult is in the condicion, if it's an IF, While, and how do i do that, problably i have to run orderstotal() but after that what should i do ?

thanks 

 

 

 
suicida:

Hi there, i need a little help on condicions: 

 

lets say i have 2 buy stop and 2 sell stops wainting

when the buy stops activate and became buy, it well delete the sell stops remaing, but if only one buy stop became active it will do nothing. 

my difficult is in the condicion, if it's an IF, While, and how do i do that, problably i have to run orderstotal() but after that what should i do ?

Loop through all the open order to determine what is open,  when you know what is open take the action you want to take.
 

Hi there, thanks i was looking out for the loop and came across this article https://www.mql5.com/en/articles/1404 

and it was close to what i was looking for, thanks. 

Reason: