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-
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.