Lipi Reference Lipi

Functions

timestamp()

Assembles a time from its parts - the other direction from the eight functions that take a time apart. The parts are read as a wall-clock time in the exchange's own timezone, and the result is milliseconds from the Unix epoch, matching `time` and `timenow`. Two forms. Pass series arguments and you get a series int; pass simple arguments and you get a simple int. In both forms the year, the month and the day are required, and the hour, the minute and the second may be left out, each defaulting to zero.

Syntax · 1 of 2

                timestamp(simple int year, simple int month, simple int day, simple int hour, simple int minute, simple int second) → simple int
              

Arguments

year required simple int The year. Required.
month required simple int The month. Required.
day required simple int The day of the month. Required.
hour simple int The hour. Optional.
minute simple int The minute. Optional.
second simple int The second. Optional.

Return Type

simple int

Syntax · 2 of 2

                timestamp(series int year, series int month, series int day, series int hour, series int minute, series int second) → series int
              

Arguments

year required series int The year. Required.
month required series int The month. Required.
day required series int The day of the month. Required.
hour series int The hour. Optional.
minute series int The minute. Optional.
second series int The second. Optional.

Return Type

series int

Example


          indicator("timestamp")
plot(timestamp(2025, 03, 11, 09, 30), linewidth=3, color=color.green)
plot(timestamp(2025, 03, 11, 09, 30), color=color.yellow)
plot(timestamp(2025, 03, 11, 09, 30, 15), color=color.lime)