Functions
hour()
The hour of a time you supply. Because the timezone is an argument rather than an assumption, a script can ask the same question in two zones.
Syntax
hour(series int time, series string timezone) → series int
Arguments
time required series int timezone series string Return Type
series int Example
//@lipi=2
indicator("Hour Function Example", overlay=true)
// Get current bar hour
currentHour = hour(time)
// Plot hour in Data Window
plot(currentHour, title="Current Hour")