Bauer Boy Thanks Alot but something remains

 

Thank you so much am very greatful but when the condition met, the opened order was not close. What could have caused it? pls. help me again

 
Post your code again with the CheckOrders(); function in the location where you want the orders checked and I will look at it