What about if you put in the editor the mouse above TimeCurrent() and hereafter above Period() and press F1 and read - especially what is their scale?
timecondizione1Buy = TimeCurrent() + ( Period() * 5 ); | A datetime has units of seconds. Only add seconds. PeriodSeconds |
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, I want to memorize in a variable the current time (when a condition happened) plus 5 Periods ( I'm testing EA in H1 timeframe).
This is the code:
I expected to see timecondizione1 egual to TimeCurrent() + 5 hours but the variable is TimeCurrent() + 5 minutes (see attached picture).
How can I fix it?
Thanks
Giovanni