input.time

A time setting, returned as an int. The date functions take a time and a timezone, so a value from here can be fed to hour, year and the rest.

input.time(const int defval, const string title, const string tooltip, const string inline, const string group, const bool confirm) → input int
ParameterTypeRequiredDescription
defvalconst intyesThe time the control starts at. Required.
titleconst stringnoThe label shown beside the control.
tooltipconst stringnoHelp text for the control.
inlineconst stringnoA key that puts several controls on one row.
groupconst stringnoA heading the control sits under.
confirmconst boolnoAsks the reader to confirm the value.

Returns input int — An input int.

indicator("After a chosen time")
plotshape(time >= input.time(0, "Start time"), title = "After the start time")

See also inputs · input.bool · input.color · input.float

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade