Positions parameter - Common Tab EA
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?
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