if am using two MA indicator for buy and sell.

 
if am using two MA indicator for buy and sell, if a buy condition is met the EA does not stop opening order on the buy condition even after tp or sl has been hit and i want it to only open once (1) everytime the condition is met
 
Youg Chee i want it to only open once (1) everytime the condition is met

You are looking at a signal. Act on a change of signal.
          MQL4 (in Strategy Tester) - double testing of entry conditions - MQL5 programming forum #1 2017.12.12