Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Daniel Alarcon: So I'd like to get the value of Only Shorts, Only Longs, Both on my script. This will help me a lot to take decisions on my EA. I've tried the SYMBOL_TRADE_MODE but it says it's FULL_MODE not the current mode.
As far as I know, that is not reported in any of the internal MQL properties available to the program.
Does anyone would like to help me?
Is there a not conventional way to check this? Maybe trying to open an order and if it fails with an specific OP_TYPE it's because it's only long or only short?
Daniel Alarcon #: Is there a not conventional way to check this? Maybe trying to open an order and if it fails with an specific OP_TYPE it's because it's only long or only short?
Yes, that is certainly a plausible work-around.
However, why not simply have a EA parameter to select "Long/Short/Both", instead of having to rely on the "Common" tab?
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
Hi,
So I'd like to get the value of Only Shorts, Only Longs, Both on my script. This will help me a lot to take decisions on my EA.
I've tried the SYMBOL_TRADE_MODE but it says it's FULL_MODE not the current mode.
Does anyone would like to help me?
Thanks in advance!
MQL4