Patrick00069:
Hello everyone,
Could anybody help me to find info about how to set trading hours. For example no trade before 7AM and no trade after 8PM.
Thank you very much in advance!
Best regards
Patrick
Try something like this (MQL5):
MqlDateTime dateTimeNowUtc; TimeGMT(dateTimeNowUtc); if (dateTimeNowUtc.hour>=7 && dateTimeNowUtc.hour<=20) { // do trade operations } else { // close any open positions but no other trade operations }
- Patrick
Pix:
Thanks a lot man!Try something like this (MQL5):
- Patrick
Pix:
Thankyou for sharing maybe useful not for only ts but all peopleTry something like this (MQL5):
- Patrick
I am still not use mt5 now whether this codebase also can used on mt4 platform and how to use it
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
Hello everyone,
Could anybody help me to find info about how to set trading hours. For example no trade before 7AM and no trade after 8PM.
Thank you very much in advance!
Best regards
Patrick