TimeHour(TimeCurrent())
Irtron:
TimeHour(TimeCurrent())
Thanks so much Irtron!
You might want to check the actual value returned by TimeCurrent() on your system.
On my system, for forward testing, I get TimeCurrent() which is different from Time/iTime which is expected due to different timezones.
During back testing however, TimeCurrent() is the same as Time/iTime.

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
My EA is set to trade only at certain times during the day (not between London close and Asian open), but I cannot get this to work in the strategy tester.
I thought I might be able to use iTime, but don't know how to get iTime to return values for "hour."
Does anyone know how to get the "hour" when using the stategy tester. Hour() only references the current time and not the Strategy Tester time.
Many thanks.