True when the chart's timeframe is measured in weeks, such as one week or two weeks.
timeframe.isweekly is true on a weekly chart and on charts that group several weeks. It is false on intraday, daily and monthly charts. It is a simple bool.
Combine it with timeframe.isdaily and timeframe.ismonthly to branch by period size, or use timeframe.isdwm to cover every timeframe from one day up.
Type
simple bool
Remarks
- Test this flag rather than comparing
timeframe.periodwith a typed string. - On Sidechair: true when a bar is at least seven days and less than twenty-eight days long.
Example
//@version=6
indicator("Weekly check")
plot(close, "Close", color.gray)
plot(timeframe.isweekly ? 1 : 0, "Is weekly", color.orange)See also
Runs on Sidechair