EA To trade only once per MA cross

 
Hi, im trying to code an EA, but the trade continue to open once the condition is meet.. i need some help.. so the trade only trigger per MA cross, until wait for next cross to trigger next trade.. any one who good in programming can help ?
 
You must show your code, otherwise people can't help you
 
Eng How Tan:
Hi, im trying to code an EA, but the trade continue to open once the condition is meet.. i need some help.. so the trade only trigger per MA cross, until wait for next cross to trigger next trade.. any one who good in programming can help ?
I think you need one other variable which is indicate buy or sell already prevail.
 
You need to add a check if there are open operations
Reason: