EA with just one entry and exit

 
So I want my EA enter just one time when one condition is true and hold that order until opposite condition is true and than EA would exit. I don't want that my ea buy every candle when the condition is true.

Can somebody help?
 
xoxo123: So I want my EA ...
learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
Reason: