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
Doesn't exist in MQL4 either. When you see blue text with underlines, those are hyperlinks. You click on them to see other pages.
Thank you William for your suggested solution!
1. Hoever, is
MQL4 as this function does not exist in MQL5? What would be the MQL5 pendant?
2.Nevertheless, I would still like to understand/know if my provided solution would be correct or if it might lead to any false results?
You can just leave out the time statement. - (I think... ) :-)
Hi Dominik, just leaving out the time statement does not do the job because then it counts the seconds from 1970 to today and that is then compared to the time portion HR1435 and HR2055. I have checked the time function written in mql4 code again but I do not understand how it works so not able to translate it to mql5 code.
Nevertheless, thank you for your provided solution but I think I will stick to the one I provided. I tested it for different timepoints and it seems to work and is much more readable/intuitive for me than comparing hour and mm separately.
Hello William,
I had another look at your function:
If I understand it correctly, when the function is called without any time, the function recalls itself using TimeCurrent() and then returns "TimeCurrent() % HR2400"
I would adjust your code provided as follows:
Is this correct?
Nevertheless, I spotted that the definition of HR2400 results in "984480" seconds. I would assume it to be "86400" as stated in the comment of the code as this is the number of seconds for 24h. Maybe this time it is MQL4 related?
Thank you!