is there an easy way to check if a specific order is opened?

 

hi

i have an ea that opens multiple trades (ticket_111, ticket_121, ticket_131,...), but the problem is that each ticket is opened multiple times, so i need a method to control the number of trades opened.

an "if" statement would be the best. something like:

if(ticket_111==0)
{
 *open trade ticket_111*
}
 
in case its unclear, the if statement should mean: if ticket_111 is not opened