You have to check whether the Symbol allows such orders - look into the specification:
https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#symbol_expiration_mode
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
- www.mql5.com
Symbol Properties - Environment State - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
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'm beginner in MQL5. I am trying to create OrderSend expert.
I write this code :
But when run I am getting this expert error :
" 2021.10.01 00:00:00 failed buy limit 100 [my symbol] at 45400 sl: 40860 tp: 54480 [Invalid expiration]"In Strategy Tester window I enter custom period from 2021.10.01 to 2021.10.20. I also tried my hard and select different date but not worked anything.
Any advise will be appreciated!