Need help on my AE please.

 

My first AE that uses a simple RSI trigger. When the RSI value is more than a certain level it wil either buy or sell. The buy or sell part is working - actually it is working to well.

I need the AE to enter only once on a sell and the next must be a buy and visa versa. The problem is the AE keeps on buying on buy conditions untill the conditions are right to sell again and visa versa.

Can anyone help me to correct this problem? I need my AE to only Buy when the conditions are right and the next condition must be a Sell condition only.

In other words it must be buy; sell; buy;sell or sell;buy sell;buy and NOT a buy; buy;buy;sell;sell;buy;sell cenario for example. Hope I make sense.

Help will be appreciated.

 

GD

See this EA https://www.mql5.com/en/code/8714

for example of tracking orders by MagicNumber and counting Buys and Sells

Good Luck

-BB-