WoodenHorse:
Alert("TimeMinute(Time[i]) = ", TimeMinute(Time[10])); //works, alert displays minute value 10 mins ago Alert("TimeHour(Time[i]) = ", TimeHour(Time[4])); //Doesn't work, alert displays current hour value | Time[10] is not 10 minutes ago, it is 10 bars ago. On a D1 chart that is 10 trading days ago. On H1 or higher charts, TimeMinute(Time[x]) will always be zero. On M5 chart it will always be a multiple of 5. Only on the M1 chart will Time[10] be approximately 10 minutes ago. |
Many thanks for your quick, detailed & easy to follow response.
Alas, I think I was having a bit of a senior moment!
Cheers.

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
I'm using build 646 v4.00.
Alert("TimeHour(TimeCurrent()) = ", TimeHour(TimeCurrent())); //works
Alert("TimeMinute(Time[i]) = ", TimeMinute(Time[10])); //works, alert displays minute value 10 mins ago
Alert("TimeHour(Time[i]) = ", TimeHour(Time[4])); //Doesn't work, alert displays current hour value
Any ideas anybody?