Filling a stop order or cancel trade string.

 
I have no programming experience and I have put about a 100 hours into learning and coding my EA. It does what I want it to do, but it will set a stop order and may fill it 4 hours later. How can I get the ea to execute buy or sell stop on the next bar only or wait until the criteria happens again. Thnaks for your help.
Reason: