You just generated an Expert Advisor in the MQL5 Wizard.
If you need an individual strategy, you need to write your own code.
![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
Good day
l have made an EA on mt5 which uses the crossover of fast and slow moving averages to enter both long and short positions. l want to be in a position to disable the long position when lam entering a sell and disable a short position when lam entering a buy, using the long_allowed and short_allowed bool inputs. below is my code