time
Adds a time input field to your indicator’s Inputs panel. This is useful for session boundaries, alert times, or any setting where the user must specify a precise time (within a range).
Syntax
input.time(title, value, id?, min, max, tooltip?, group?, inline?)
Parameters
title
string— Label shown in the Inputs panel.value
number— Default time value (numeric representation, typically seconds or timestamp depending on implementation).id
string(optional) — Unique key for referencing this input. If omitted, it is auto-generated fromtitle(lowercased, spaces removed).min
number— The earliest allowed time value.max
number— The latest allowed time value.tooltip
string(optional) — Help text shown on hover.group
string(optional) — Groups this input with others inside a collapsible section.inline
string(optional) — Aligns multiple inputs in the same row if they share the same key.
Return Value
{ id: string } — The assigned id for this time input.
Example
Result

Tips
Use consistent numeric formats (e.g.,
930for 9:30 AM,1600for 4:00 PM).Combine
time()withsession()for full session customization.
Warning
Always enforce valid ranges—if min/max are too wide, users may enter invalid or nonsensical times.
Last updated