Prevent EA from ppening another trade once it closes

To add comments, please log in or register
pwakhungu
37
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? 
Mohamad Zulhairi Baba
16918
Mohamad Zulhairi Baba  
pwakhungu:
I want it to not open any more trades until a the next reversal.

wait for next reversal then..

Keith Watford
Moderator
14476
Keith Watford  
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.

pwakhungu
37
pwakhungu  
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
To add comments, please log in or register