True when the chart's timeframe is measured in days, such as one day or three days.
timeframe.isdaily is true on a daily chart and on charts that group several days, such as 3D. It is false on intraday, weekly and monthly charts. It is a simple bool.
Use it with timeframe.isweekly and timeframe.ismonthly when a script needs to treat daily bars differently from the larger periods, or use timeframe.isdwm for all three at once.
Type
simple bool
Remarks
- Do not test
timeframe.period== "D": a multi-day chart has another string, and the spelling of the one-day string differs between versions. isdaily covers all of them. - On Sidechair: true when a bar is at least one day and less than seven days long.
Example
//@version=6
indicator("Daily check", overlay = true)
plot(close, "Close", color.gray)
bgcolor(timeframe.isdaily ? color.new(color.blue, 90) : na)
plot(timeframe.isdaily ? 1 : 0, "Is daily", color.orange)See also
Runs on Sidechair