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 The time to read. Required. timezone series string The timezone to read it in. Required. Return Type
series int Example
indicator("Hour Function Example", overlay=true)
// Get current bar hour
currentHour = hour(time)
// Plot hour in Data Window
plot(currentHour, title="Current Hour")