# Seasonality Widget

Seasonality Widget is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

The Seasonality Widget buckets market history by hour, weekday, day of month, month, or year, then reports the mean, median, max, min, or max-min average of price change, range, or volume per bucket. Distorting years can be filtered out entirely - for traders who want calendar tendencies measured rather than remembered.

- Indicator in the LuxAlgo Library, by LuxAlgo, published May 14, 2024.
- Access: free.
- Concepts: [Seasonality Tooling](https://www.luxalgo.com/library/concept/seasonality-tooling/) (primary), [Month-of-year Seasonality](https://www.luxalgo.com/library/concept/month-of-year-seasonality/), [Day-of-week Effects](https://www.luxalgo.com/library/concept/day-of-week-effects/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn5kmg007uvhsgc7r1ifpz
- Page: https://www.luxalgo.com/library/indicator/seasonality-widget/

**Seasonality Widget** answers a blunt question: at this hour, on this weekday, in this month - what does this market usually do? Choose a granularity (Hour, Day Of Week, Day Of Month, Month, or Day Of Year) and the widget groups every observation since your chosen start date into buckets, then summarizes each bucket with the statistic you pick. It is a general-purpose piece of [seasonal-analysis tooling](https://www.luxalgo.com/library/concept/seasonality-tooling/): the same machinery profiles an hourly rhythm in crypto, a weekday tilt in an index, or a monthly pattern in a commodity.

## How to Trade the Seasonality Widget?

- **Choose the series**: Price Change (absolute, percent, or sign), Range, Price - SMA, Volume, or Volume - SMA. Sign mode is normalized to 0-100, where readings above 50 mean positive changes outnumber negative ones.
- **Pick the statistic**: Mean, Median, Max, Min, or Max-Min Average - the median resists outliers, while max and min bound each bucket's extremes.
- **Filter the sample**: set a Filter Granularity and list comma-separated values in the Numerical Filter Input to exclude them; entering a year such as 2008 drops it from every bucket.

Hourly buckets reveal which hours of the day have historically carried the movement; weekday buckets do the same for [day-of-week effects](https://www.luxalgo.com/library/concept/day-of-week-effects/); monthly buckets sketch the shape of the year.

## Seasonality Widget Settings

- **Granularity**: the period data is grouped by.
- **From Date**: the first date included in the sample.
- **Analyze**: the data series fed into the buckets.
- **SMA Length**: the moving-average period behind Price - SMA and Volume - SMA.
- **Statistic**: the summary applied to each bucket.
- **Filter Granularity / Numerical Filter Input**: the period type to exclude and the specific comma-separated values to drop.

## Frequently Asked Questions

### Which statistic should I read first?
The median is the steadiest starting point, since a single outlier session cannot drag it the way it drags the mean. Max and min are not tendency measures at all - they mark the best and worst outcomes a bucket has produced.

### When are the filter settings worth using?
Whenever a known distortion would contaminate the averages. Excluding a crisis year - or any period you judge unrepresentative - keeps one regime from masquerading as a seasonal tendency.

### Where do I get the Seasonality Widget?
It is free on the LuxAlgo Library. If you would rather see the whole year as one averaged curve than as bucket statistics, the [Seasonality Chart](https://www.luxalgo.com/library/indicator/seasonality-chart/) is its companion build. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Seasonality Chart](https://www.luxalgo.com/library/indicator/seasonality-chart/) (Seasonality Tooling): markdown at https://www.luxalgo.com/library/indicator/seasonality-chart.md
- [Volume Forecasting](https://www.luxalgo.com/library/indicator/volume-forecasting/) (Seasonality Tooling): markdown at https://www.luxalgo.com/library/indicator/volume-forecasting.md
- [Buy Sell Calendar](https://www.luxalgo.com/library/indicator/buy-sell-calendar/) (Seasonality Tooling): markdown at https://www.luxalgo.com/library/indicator/buy-sell-calendar.md
- [Peak Trading Activity Graphs](https://www.luxalgo.com/library/indicator/peak-trading-activity-graphs/) (Seasonality Tooling): markdown at https://www.luxalgo.com/library/indicator/peak-trading-activity-graphs.md
- [Weekly Stacked Daily Changes](https://www.luxalgo.com/library/indicator/weekly-stacked-daily-changes/) (Seasonality Tooling): markdown at https://www.luxalgo.com/library/indicator/weekly-stacked-daily-changes.md
- [Day Of Week Price Distribution](https://www.luxalgo.com/library/indicator/day-of-week-price-distribution/) (Seasonality Tooling): markdown at https://www.luxalgo.com/library/indicator/day-of-week-price-distribution.md
- [Market Performance by Yearly Seasons](https://www.luxalgo.com/library/indicator/market-performance-by-yearly-seasons/) (Month-of-year Seasonality): markdown at https://www.luxalgo.com/library/indicator/market-performance-by-yearly-seasons.md
- [Periodic Activity Tracker](https://www.luxalgo.com/library/indicator/periodic-activity-tracker/) (Day-of-week Effects): markdown at https://www.luxalgo.com/library/indicator/periodic-activity-tracker.md

---

Source: https://www.luxalgo.com/library/indicator/seasonality-widget/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
