Sidechair

timeframe.ismonthly

Browse the reference

True when the chart's timeframe is measured in months, such as one month or three months.

Try it in the editor

timeframe.ismonthly is true on a monthly chart and on charts that group several months. It is false on every shorter timeframe. It is a simple bool.

It is the last step of the ladder isseconds, isminutes, isdaily, isweekly, ismonthly. Use timeframe.isdwm when you want to treat all of daily, weekly and monthly alike.

Type

simple bool

Remarks

  • Test this flag rather than comparing timeframe.period with a typed string.
  • On Sidechair: true when a bar is twenty-eight days long or longer.

Example

Pine ScriptMonthly flagOpen in editor
//@version=6
indicator("Monthly check")
plot(close, "Close", color.gray)
plot(timeframe.ismonthly ? 1 : 0, "Is monthly", color.orange)

See also

Runs on Sidechair