Functions
input.time()
Adds a time input field to the script's "Settings/Inputs" tab, providing two widgets on the same line—one for selecting the date and another for the time. This function returns the selected date/time in UNIX format. Enabling confirm = true activates interactive input mode, allowing users to select a specific point in time by clicking on the chart.
Syntax
input.time(const int defval, const string title, const string tooltip, const string inline, const string group, const bool confirm) → input int
Arguments
defval required const int Determines the default value of the input variable proposed in the script's "Settings/Inputs" tab, from where the user can change it. The value can be a timestamp function, but only if it uses a date argument in const string format. title const string Title of the input. If not specified, the variable name is used as the input's title. If the title is specified, but it is empty, the name will be an empty string. tooltip const string The string that will be shown to the user when hovering over the tooltip icon. inline const string Combines all the input calls using the same argument in one line. The string used as an argument is not displayed. It is only used to identify inputs belonging to the same line. group const string Creates a header above all inputs using the same group argument string. The string is also used as the header's text. confirm const bool If true, the interactive input mode is enabled and the selection is done by clicking on the chart when the indicator is added to the chart, or by selecting the indicator and moving the selection after that. Optional. The default is false. Return Type
input int