Skip to content
Algo Trade Analytics Docs

minute - Pine Script Variable

Current bar minute in exchange timezone.

int

series

  • Returns the minute based on the bar’s opening time in the exchange timezone.
  • Pairs well with hour for defining intraday windows or opening ranges.
//@version=6
indicator("First 5 minutes", overlay=true)
isOpeningRange = hour == 9 and minute < 5
bgcolor(isOpeningRange ? color.new(color.blue, 90) : na)