![Documentation on MQL5: Trade Functions / OrderSend Documentation on MQL5: Trade Functions / OrderSend](/i/community/logo_mql5_small.png)
- www.mql5.com
MT4 offers this setting when attaching the EA to the chart to have Long only or Short only
I cannot find this in MT5. How can I do this in MT5? The only thing I can think of is to program into the EA.
I would suggest extending the CExpert class and changing the CheckOpen method in order to only check long / short according to a parameter
How is this related to the topic ?
so meaning is confirmed that MT5 do not have this option.
I think I have to declare a custom enum as an input?
where can I read on custom enum?
It's a simple way to implement long only / short only EAs, since the option doesn't seem to be available in mql5 (did I misunderstand the question?)
![Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Trade Orders in DOM Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Trade Orders in DOM](/i/community/logo_mql5_small.png)
- www.mql5.com
so meaning is confirmed that MT5 do not have this option.
I think I have to declare a custom enum as an input?
where can I read on custom enum?
![Documentation on MQL5: Language Basics / Data Types / Integer Types / Enumerations Documentation on MQL5: Language Basics / Data Types / Integer Types / Enumerations](/i/community/logo_mql5_small.png)
- www.mql5.com
so meaning is confirmed that MT5 do not have this option.
I think I have to declare a custom enum as an input?
where can I read on custom enum?
I will try to upload the modified version to the code base
I don't think have any problem with mql5. Of course with mql5 you can send any order you want. He is talking about an option of MT4 terminal which disappears in MT5 terminal. With this option you can have a EA placing only Buy order for example, even if the EA is build to send buy and sell order.
That's what I was talking about, a way to modify the default implementation in order to provide that option
I will try to upload the modified version to the code base
That's what I was talking about, a way to modify the default implementation in order to provide that option
![Create your own Market Watch using the Standard Library Classes Create your own Market Watch using the Standard Library Classes](https://c.mql5.com/36/1/create-your-own-market-watch-using.png)
- 2010.12.28
- Dmitriy Skub
- www.mql5.com
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
MT4 offers this setting when attaching the EA to the chart to have Long only or Short only
I cannot find this in MT5. How can I do this in MT5? The only thing I can think of is to program into the EA.