Who translates this simple code in mql4? thanks in advance

 

I have to turn this request into a loop....

"Close all orders with a comment equal to null when there are no more orders with a comment not equal a null"


can anyone help me with this script?

 
Only OrderSend creates a comment, and they can not be changed. Not a good idea to use comments, brokers can change comments, including complete replacement.
Reason: