timeframe.change
True on the first bar of a new bar of timeframe: a new day for "D", a new hour for "60". The same as ta.change(time(timeframe)) != 0. False on the first bar of the chart.
timeframe.change(timeframe: simple string) -> bool
Parameters
timeframesimple string: "5m", "1h", "4h", "1D", "1W", "1M" (also "D", "60", "240")
Example
if timeframe.change("D")
label.new(bar_index, high, "new day")