Prevent EA from ppening another trade once it closes

 
I have an EA which I have developed to trade on reversal using EMAs and other indicators. The EA works fine, but on a M15 chart, it opens a trade after it closes one because the trade on that candle is still valid. I want it to not open any more trades until a the next reversal.  How can I implement that? 
 
pwakhungu:
I want it to not open any more trades until a the next reversal.

wait for next reversal then..

 
pwakhungu:
I have an EA which I have developed to trade on reversal using EMAs and other indicators. The EA works fine, but on a M15 chart, it opens a trade after it closes one because the trade on that candle is still valid. I want it to not open any more trades until a the next reversal.  How can I implement that? 

Use a Global scope variable. When you open a trade set the variable so that you know if it is a buy signal or a sell signal. Don't open another trade unless it is an opposite signal.

 
Keith Watford:

Use a Global scope variable. When you open a trade set the variable so that you know if it is a buy signal or a sell signal. Don't open another trade unless it is an opposite signal.

Thanks @Keith Watford