emmatb:
You check the ordertype...OrderType=OP_SELL or.._BUY
Hi,
I am new to coding in mql4. Can somebody tell me how do you take the variable that tell if the expert advisor will send only short orders, only long orders or both(the one from Common tab)?
Thanks
emmatb: how do you take the variable that tell if the expert advisor will send only
short orders, only long orders or both(the one from Common tab)?
- There isn't any; the EA's code determines what it "will send." The OrderSend will fail if it isn't allowed that
direction however.
- If you meant how to find out the settings, perhaps you should read the manual. MQL5 Reference
→ Market Info → SymbolInfoInteger
→ ENUM_SYMBOL_INFO_INTEGER
Constant Description Usage SYMBOL_TRADE_MODE_LONGONLY Allowed only long positions SymbolInfoInteger SYMBOL_TRADE_MODE_SHORTONLY Allowed only short positions SymbolInfoInteger
William Roeder:
Hi, I already tried this. It seems to show the modes you cand trade on a chart. And the OrderType() is working if you select an order before.
- There isn't any; the EA's code determines what it "will send." The OrderSend will fail if it isn't allowed
that direction however.
- If you meant how to find out the settings, perhaps you should read the manual. MQL5 Reference
→ Market Info → SymbolInfoInteger
→ ENUM_SYMBOL_INFO_INTEGER
Constant Description Usage SYMBOL_TRADE_MODE_LONGONLY Allowed only long positions SymbolInfoInteger SYMBOL_TRADE_MODE_SHORTONLY Allowed only short positions SymbolInfoInteger
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,
I am new to coding in mql4. Can somebody tell me how do you take the variable that tell if the expert advisor will send only short orders, only long orders or both(the one from Common tab)?
Thanks