Download MetaTrader 5

How to check if bar starts at round hour?

To add comments, please log in or register
Rangel Stoilov
199
Rangel Stoilov 2013.12.27 15:31 

Hey guys,

does anyone have an idea how I can check if a bar is starting at a round hour?

Thanks in advance.

Simon Gniadkowski
Moderator
18002
Simon Gniadkowski 2013.12.27 15:34  
rori4:

Hey guys,

does anyone have an idea how I can check if a bar is starting at a round hour?

Do you mean . . .

if (TimeMinute(Time[0]) > 0 )

. . . ?

whroeder1
14737
whroeder1 2013.12.27 16:36  
bool isTopOfTheHour = (Time[0] % 3600) == 0;
Rangel Stoilov
199
Rangel Stoilov 2013.12.27 16:42  
Yes exactly :) Thanks a million :)
To add comments, please log in or register