Sidechair

second

Browse the reference

The second of the minute of the current bar's open time, from 0 to 59.

Try it in the editor

second is a series int. On any chart whose timeframe is a whole number of minutes it is always 0, so it is only useful on second-based charts.

Type

series int

Remarks

  • second[n] is na before the first bar.
  • On Sidechair: the parts are read in the symbol's exchange time zone, the same as syminfo.timezone.
  • A 15-second bar that opens at 10:00:15 reads 15, so seconds-based filters need second-based charts.

Example

Pine ScriptSeconds on this chartOpen in editor
//@version=6
indicator("Seconds", overlay = false)
plot(second, "Second")
plot(timeframe.in_seconds(), "Timeframe seconds", color.gray)

See also

Runs on Sidechair