Larry Williams Strategy help

 

hello to everyone giuseppe I just registered on this forum. 
I would like someone to help me solve my problem 
I would say to my EA to close the position at the opening of the next bar only if the position is in profit. I do not know how to do 
can someone help me?

Files:
Reason: