Please help, How can I find out wether the marked is closed?
sarged:
Please help, How can I find out wether the marked is closed?
Please help, How can I find out wether the marked is closed?
ENUM_SYMBOL_TRADE_MODE SymbolInfoInteger(string name, int prop_id);
ENUM_SYMBOL_TRADE_MODE
Identifier | Description |
SYMBOL_TRADE_MODE_DISABLED | Trade is disabled for the symbol |
SYMBOL_TRADE_MODE_LONGONLY | Allowed only long positions |
SYMBOL_TRADE_MODE_SHORTONLY | Allowed only short positions |
SYMBOL_TRADE_MODE_CLOSEONLY | Allowed only position close operations |
SYMBOL_TRADE_MODE_FULL | No trade restrictions |
Trade is disabled while the market is closed, if I remember.
Another option is using the standard library CSymbolInfo class, which can save you some time writing functions.
There's an article related to verifying and checking limitations of your EA.
Cheers,
Lugs
Documentation on MQL5: Market Info / SymbolInfoSessionTrade
- www.mql5.com
Market Info / SymbolInfoSessionTrade - Documentation on MQL5
d'oh
Thanks, that'll help
Lugner:
Did it help you? What session index to use to get the info for the current session? If I use 0, it gets me some 1970 dates, if I use any other number it fails to get session info.d'oh
Thanks, that'll help
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