OPEN-SOURCE SCRIPT
Market Seasonality Calendar

Market Seasonality Calendar adds a recurring calendar framework to the price chart. It highlights nine predefined seasonal periods, explains their assigned market context, displays the next three upcoming periods, and summarizes how the selected instrument moved during previous occurrences.
The indicator is designed for traders who want to include seasonal context in market preparation and chart analysis. It combines calendar shading, a timeline, explanatory text, instrument-specific historical statistics, and advance alerts in one overlay.
It provides context for an existing trading process. It does not generate trade entries, exits, stop-loss levels, or price targets.
**How the calendar works**
The model uses fixed date ranges that repeat every year. Each range has an assigned interpretation: a positive seasonal bias, a downside-risk context, or potential support from share buybacks.
These are predefined seasonal hypotheses. The script does not discover the dates by searching for the most profitable historical periods. The assigned color remains the same even when historical results disagree with the expected direction.
Event names describe the themes associated with the calendar model. The indicator does not retrieve actual earnings dates, GDP release schedules, contract expiration calendars, or executed buyback activity. An event label does not mean that the named event occurs within that exact date range every year or for every company.
**Included seasonal periods**
- January 3–12 — Green: positive seasonal context; Q4 earnings/GDP theme and beginning-of-year expectations.
- March 15–22 — Red: downside-risk context; futures and options expiration theme and profit-taking.
- April 5–10 — Green: positive seasonal context; Q1 earnings/GDP theme and the beginning of the second quarter.
- June 17–21 — Red: downside-risk context; contract expiration and portfolio rebalancing themes.
- July 4–11 — Green: positive seasonal context; Q2 earnings/GDP theme.
- September 16–20 — Red: downside-risk context; contract expiration and end-of-summer profit-taking themes.
- October 5–10 — Green: positive seasonal context; Q3 earnings/GDP theme and buyback expectations.
- November 1–7 — Gold: potential demand support associated with the share buyback theme.
- December 16–23 — Red: downside-risk context; contract expiration and year-end position unwinding themes.
Dates are inclusive and refer to calendar days. The schedule is not shifted to match holidays or actual event dates. Price zones and statistics use the available chart bars within those ranges.
**Reading the colors**
Green identifies periods assigned a positive or upward seasonal bias. Price can still fall during a green period.
Red identifies periods assigned a downside-risk and volatility theme. Price can still rise during a red period. The indicator does not test whether volatility actually increased; its historical match calculation measures price direction.
Gold identifies the model’s buyback-support period. It does not confirm that a company is buying shares, and it does not mark a technical support level.
Outside the listed periods, the panel reports no active window. This means that the calendar has no active classification; it does not mean that market risk is low.
**Suitable instruments**
The intended starting point is U.S. equity-market analysis. Broad U.S. equity benchmarks and related ETFs, such as the S&P 500/SPY and Nasdaq-100/QQQ, are sensible instruments for exploring the model because its themes concern corporate earnings, equity derivatives, and share buybacks.
This is a recommendation based on the model’s intended context, not evidence of superior predictive performance on those instruments.
Individual U.S. stocks can also be examined. However, company-specific news and earnings announcements may outweigh broad calendar effects. Verify those events separately.
For other equity markets, index futures, or CFDs, assess the relevance of the calendar model and the selected data feed, trading sessions, and timezone. Continuous futures can also be affected by contract rolls and historical adjustments. The script does not adapt its calendar to each local market.
The model was not specifically calibrated for cryptocurrency, foreign exchange, or commodities. Being able to display the overlay on an instrument does not establish that its seasonal assumptions apply there.
**Recommended timeframes**
Start with the daily chart, 1D, to review the multi-day periods and historical statistics.
Intraday charts, such as 4H, 1H, or 15 minutes, can provide a more detailed view of price behavior within a seasonal period. The calendar dates remain the same on every supported timeframe.
The supported calculation timeframes are 1D and intraday. Multi-day, weekly, and monthly charts are not supported for active-window tracking and statistics. Switch to 1D or lower when the panel requests it.
Standard time-based candlesticks or bars are recommended so that the statistics use ordinary market prices.
**What appears on the chart**
The information panel focuses on the active period, or the next period when none is active. It displays:
- The period’s dates and assigned market context.
- Its associated event theme.
- An explanation of the expected effect and underlying theme.
- Guidance on interpreting the seasonal context.
- A color guide.
- The next three upcoming periods with calendar-day countdowns.
- Historical statistics for the period currently in focus.
For example, when November 1–7 is in focus, the statistics summarize eligible past November 1–7 occurrences. They do not combine all green or gold periods.
The panel follows the latest chart bar rather than the bar under the cursor.
Colored boxes surround the observed price range during tracked periods. Their vertical padding uses ATR(14), and an active box can expand as new bars arrive. These boundaries are visual aids, not forecast ranges, stops, or targets.
The timeline places calendar segments above price. Future segments represent scheduled date ranges only. Its vertical position adjusts to the visible chart area.
In this version, the timeline depends on recorded colored windows. Keep “Show colored windows” enabled when using the timeline and allow enough chart history for at least one window to be tracked.
**Understanding the historical statistics**
SAMPLES is the number of completed, tracked occurrences available in the chart history for the selected period. An unfinished occurrence is not included. A period already in progress at the first loaded bar may also be excluded.
AVG MOVE is the arithmetic mean of each occurrence’s percentage price change:
100 × (last in-window bar close / first tracked in-window bar close − 1).
On a daily chart, this measures from the first included daily close to the last included daily close. It does not include the move from the previous day’s close into the first day.
On an intraday chart, the first and last included bar closes differ from those on the daily chart. Results can therefore change with timeframe and session settings. A completed observation is recorded when the first subsequent out-of-window bar arrives.
MATCH RATE is the percentage of completed occurrences whose price direction agrees with the assigned bias:
- Positive moves count as matches for green and gold periods.
- Negative moves count as matches for red periods.
- An unchanged close-to-close result is not a match.
A small move and a large move each count as one occurrence.
The accompanying labels use simple thresholds:
- LOW DATA: fewer than three observations.
- STRONG: at least three observations and a match rate of 70% or higher.
- MODERATE: at least three observations and a match rate from 55% to below 70%.
- WEAK: at least three observations and a match rate below 55%.
These labels summarize historical directional agreement. They are not confidence levels, statistical significance tests, or probability forecasts.
Match rate is not a trade win rate. Average move is not a strategy return. The calculations do not simulate orders, transaction costs, slippage, stops, or position sizing.
Available history, symbol, timeframe, session, timezone, and chart price adjustments can affect the results. The “Historical windows” setting limits the number of displayed boxes, not the number of observations used in the statistics.
**A practical workflow**
1. Open a standard daily chart, for example SPY, and add the indicator.
2. Keep “Use exchange timezone” enabled initially and load sufficient historical data.
3. Read the active or next period, its explanation, and the sample count before interpreting the percentages.
4. Compare the calendar context with your own trend, price-level, volume, and risk analysis. Check actual company and economic event dates separately.
5. If useful, switch to an intraday chart to inspect price behavior inside the period. Remember that statistics will be recalculated using that chart’s bars.
6. Use upcoming-period alerts as preparation reminders, then review completed outcomes without assuming that the seasonal bias must repeat.
For example, a red period approaching during an uptrend is a reason to review the risk context within your own process. The calendar alone does not confirm a reversal or specify a short entry.
**Settings and languages**
The panel supports English, Russian, German, Spanish, Arabic, and Simplified Chinese. Input titles remain in English.
Panel position offers four chart corners. Panel size offers Compact, Standard, and Large.
The display settings include:
- Show information panel — displays the dashboard.
- Show colored windows — displays the tracked seasonal price zones.
- Show timeline above chart — displays calendar segments above price.
- Window transparency — adjusts zone shading.
- Window padding (ATR) — adjusts spacing around the observed price range.
- Historical windows — controls the number of retained boxes.
- Timeline distance (ATR) — adjusts the timeline’s vertical distance from price.
The calendar uses the symbol’s exchange timezone by default. Disable “Use exchange timezone” to apply the “Custom timezone (IANA)” setting.
Date classification uses each bar’s opening timestamp in the selected timezone. Changing only the chart’s displayed timezone does not change the indicator’s timezone setting.
**Alerts**
The indicator supports a window-start alert and an advance warning.
“Warn N calendar days before” sets the warning range, with a default of three calendar days. The warning occurs when the chart first enters that range; it is not intended as a daily reminder.
Enable the desired alert types in the indicator settings, then create a TradingView alert for this indicator.
Choose “Any alert() function call” for detailed messages localized to the selected language. Alternatively, select an individual “Calendar window started” or “Calendar window approaching” condition for its fixed English message.
Alerts run on live chart updates. They are not independent weekend or holiday calendar notifications. Adding the indicator does not automatically create a running alert.
If a boundary passes while no bars arrive, delivery can be delayed or the warning can be missed. Recreate alerts after changing the settings or language that they should use.
**Scope and limitations**
This indicator provides a fixed-calendar overlay with descriptive historical statistics. Future dates are known because the calendar is predefined, not because future price information is available.
Active price boxes evolve with incoming bars. Completed-window statistics become available after the window ends and a subsequent bar arrives.
The script does not validate the economic explanation behind each period, establish causation, or guarantee that historical effects will persist.
Use it as an educational and analytical aid alongside independent analysis and risk management.
**English**
Highlights nine fixed seasonal periods, shows upcoming windows, and summarizes historical price changes and directional agreement for the selected instrument. Start with U.S. equity indices or ETFs on 1D; intraday charts are also supported. Provides calendar context, not trade signals or a live economic calendar.
**Русский**
Отмечает девять фиксированных сезонных периодов, показывает ближайшие окна и историческую статистику изменения цены и совпадения направления. Начните с фондовых индексов США или ETF на 1D; внутридневные графики также поддерживаются. Это календарный контекст, а не торговые сигналы или актуальное расписание экономических событий.
**Deutsch**
Markiert neun feste saisonale Zeitfenster und zeigt kommende Zeiträume sowie historische Kursveränderungen und die Übereinstimmung mit der erwarteten Richtung. Als Einstieg eignen sich US-Aktienindizes oder ETFs im Tageschart; Intraday-Charts werden ebenfalls unterstützt. Liefert saisonalen Kontext, keine Handelssignale und keinen aktuellen Wirtschaftskalender.
**Español**
Señala nueve períodos estacionales fijos y muestra los próximos períodos, la variación histórica del precio y la coincidencia con el sesgo previsto. Para empezar, utilice índices bursátiles estadounidenses o ETF en 1D; también admite gráficos intradía. Aporta contexto estacional, no señales de operativa ni un calendario económico actualizado.
**العربية**
يحدد تسع فترات موسمية ثابتة، ويعرض الفترات القادمة والتغيرات التاريخية للأسعار ومدى توافق اتجاهها مع الميل الموسمي المفترض. يُنصح بالبدء بمؤشرات الأسهم الأمريكية أو صناديق المؤشرات المتداولة على الإطار اليومي؛ كما يدعم الأطر الزمنية خلال اليوم. يقدم سياقًا موسميًا، وليس إشارات تداول أو تقويمًا اقتصاديًا محدثًا.
**中文(简体)**
标示九个固定的季节性时段,展示即将到来的时段、历史价格变动及其与预设方向的一致率。建议从美国股票指数或相关ETF的日线图开始,也支持日内周期。提供季节性背景参考,不提供交易信号,也不是实时经济日历。
The indicator is designed for traders who want to include seasonal context in market preparation and chart analysis. It combines calendar shading, a timeline, explanatory text, instrument-specific historical statistics, and advance alerts in one overlay.
It provides context for an existing trading process. It does not generate trade entries, exits, stop-loss levels, or price targets.
**How the calendar works**
The model uses fixed date ranges that repeat every year. Each range has an assigned interpretation: a positive seasonal bias, a downside-risk context, or potential support from share buybacks.
These are predefined seasonal hypotheses. The script does not discover the dates by searching for the most profitable historical periods. The assigned color remains the same even when historical results disagree with the expected direction.
Event names describe the themes associated with the calendar model. The indicator does not retrieve actual earnings dates, GDP release schedules, contract expiration calendars, or executed buyback activity. An event label does not mean that the named event occurs within that exact date range every year or for every company.
**Included seasonal periods**
- January 3–12 — Green: positive seasonal context; Q4 earnings/GDP theme and beginning-of-year expectations.
- March 15–22 — Red: downside-risk context; futures and options expiration theme and profit-taking.
- April 5–10 — Green: positive seasonal context; Q1 earnings/GDP theme and the beginning of the second quarter.
- June 17–21 — Red: downside-risk context; contract expiration and portfolio rebalancing themes.
- July 4–11 — Green: positive seasonal context; Q2 earnings/GDP theme.
- September 16–20 — Red: downside-risk context; contract expiration and end-of-summer profit-taking themes.
- October 5–10 — Green: positive seasonal context; Q3 earnings/GDP theme and buyback expectations.
- November 1–7 — Gold: potential demand support associated with the share buyback theme.
- December 16–23 — Red: downside-risk context; contract expiration and year-end position unwinding themes.
Dates are inclusive and refer to calendar days. The schedule is not shifted to match holidays or actual event dates. Price zones and statistics use the available chart bars within those ranges.
**Reading the colors**
Green identifies periods assigned a positive or upward seasonal bias. Price can still fall during a green period.
Red identifies periods assigned a downside-risk and volatility theme. Price can still rise during a red period. The indicator does not test whether volatility actually increased; its historical match calculation measures price direction.
Gold identifies the model’s buyback-support period. It does not confirm that a company is buying shares, and it does not mark a technical support level.
Outside the listed periods, the panel reports no active window. This means that the calendar has no active classification; it does not mean that market risk is low.
**Suitable instruments**
The intended starting point is U.S. equity-market analysis. Broad U.S. equity benchmarks and related ETFs, such as the S&P 500/SPY and Nasdaq-100/QQQ, are sensible instruments for exploring the model because its themes concern corporate earnings, equity derivatives, and share buybacks.
This is a recommendation based on the model’s intended context, not evidence of superior predictive performance on those instruments.
Individual U.S. stocks can also be examined. However, company-specific news and earnings announcements may outweigh broad calendar effects. Verify those events separately.
For other equity markets, index futures, or CFDs, assess the relevance of the calendar model and the selected data feed, trading sessions, and timezone. Continuous futures can also be affected by contract rolls and historical adjustments. The script does not adapt its calendar to each local market.
The model was not specifically calibrated for cryptocurrency, foreign exchange, or commodities. Being able to display the overlay on an instrument does not establish that its seasonal assumptions apply there.
**Recommended timeframes**
Start with the daily chart, 1D, to review the multi-day periods and historical statistics.
Intraday charts, such as 4H, 1H, or 15 minutes, can provide a more detailed view of price behavior within a seasonal period. The calendar dates remain the same on every supported timeframe.
The supported calculation timeframes are 1D and intraday. Multi-day, weekly, and monthly charts are not supported for active-window tracking and statistics. Switch to 1D or lower when the panel requests it.
Standard time-based candlesticks or bars are recommended so that the statistics use ordinary market prices.
**What appears on the chart**
The information panel focuses on the active period, or the next period when none is active. It displays:
- The period’s dates and assigned market context.
- Its associated event theme.
- An explanation of the expected effect and underlying theme.
- Guidance on interpreting the seasonal context.
- A color guide.
- The next three upcoming periods with calendar-day countdowns.
- Historical statistics for the period currently in focus.
For example, when November 1–7 is in focus, the statistics summarize eligible past November 1–7 occurrences. They do not combine all green or gold periods.
The panel follows the latest chart bar rather than the bar under the cursor.
Colored boxes surround the observed price range during tracked periods. Their vertical padding uses ATR(14), and an active box can expand as new bars arrive. These boundaries are visual aids, not forecast ranges, stops, or targets.
The timeline places calendar segments above price. Future segments represent scheduled date ranges only. Its vertical position adjusts to the visible chart area.
In this version, the timeline depends on recorded colored windows. Keep “Show colored windows” enabled when using the timeline and allow enough chart history for at least one window to be tracked.
**Understanding the historical statistics**
SAMPLES is the number of completed, tracked occurrences available in the chart history for the selected period. An unfinished occurrence is not included. A period already in progress at the first loaded bar may also be excluded.
AVG MOVE is the arithmetic mean of each occurrence’s percentage price change:
100 × (last in-window bar close / first tracked in-window bar close − 1).
On a daily chart, this measures from the first included daily close to the last included daily close. It does not include the move from the previous day’s close into the first day.
On an intraday chart, the first and last included bar closes differ from those on the daily chart. Results can therefore change with timeframe and session settings. A completed observation is recorded when the first subsequent out-of-window bar arrives.
MATCH RATE is the percentage of completed occurrences whose price direction agrees with the assigned bias:
- Positive moves count as matches for green and gold periods.
- Negative moves count as matches for red periods.
- An unchanged close-to-close result is not a match.
A small move and a large move each count as one occurrence.
The accompanying labels use simple thresholds:
- LOW DATA: fewer than three observations.
- STRONG: at least three observations and a match rate of 70% or higher.
- MODERATE: at least three observations and a match rate from 55% to below 70%.
- WEAK: at least three observations and a match rate below 55%.
These labels summarize historical directional agreement. They are not confidence levels, statistical significance tests, or probability forecasts.
Match rate is not a trade win rate. Average move is not a strategy return. The calculations do not simulate orders, transaction costs, slippage, stops, or position sizing.
Available history, symbol, timeframe, session, timezone, and chart price adjustments can affect the results. The “Historical windows” setting limits the number of displayed boxes, not the number of observations used in the statistics.
**A practical workflow**
1. Open a standard daily chart, for example SPY, and add the indicator.
2. Keep “Use exchange timezone” enabled initially and load sufficient historical data.
3. Read the active or next period, its explanation, and the sample count before interpreting the percentages.
4. Compare the calendar context with your own trend, price-level, volume, and risk analysis. Check actual company and economic event dates separately.
5. If useful, switch to an intraday chart to inspect price behavior inside the period. Remember that statistics will be recalculated using that chart’s bars.
6. Use upcoming-period alerts as preparation reminders, then review completed outcomes without assuming that the seasonal bias must repeat.
For example, a red period approaching during an uptrend is a reason to review the risk context within your own process. The calendar alone does not confirm a reversal or specify a short entry.
**Settings and languages**
The panel supports English, Russian, German, Spanish, Arabic, and Simplified Chinese. Input titles remain in English.
Panel position offers four chart corners. Panel size offers Compact, Standard, and Large.
The display settings include:
- Show information panel — displays the dashboard.
- Show colored windows — displays the tracked seasonal price zones.
- Show timeline above chart — displays calendar segments above price.
- Window transparency — adjusts zone shading.
- Window padding (ATR) — adjusts spacing around the observed price range.
- Historical windows — controls the number of retained boxes.
- Timeline distance (ATR) — adjusts the timeline’s vertical distance from price.
The calendar uses the symbol’s exchange timezone by default. Disable “Use exchange timezone” to apply the “Custom timezone (IANA)” setting.
Date classification uses each bar’s opening timestamp in the selected timezone. Changing only the chart’s displayed timezone does not change the indicator’s timezone setting.
**Alerts**
The indicator supports a window-start alert and an advance warning.
“Warn N calendar days before” sets the warning range, with a default of three calendar days. The warning occurs when the chart first enters that range; it is not intended as a daily reminder.
Enable the desired alert types in the indicator settings, then create a TradingView alert for this indicator.
Choose “Any alert() function call” for detailed messages localized to the selected language. Alternatively, select an individual “Calendar window started” or “Calendar window approaching” condition for its fixed English message.
Alerts run on live chart updates. They are not independent weekend or holiday calendar notifications. Adding the indicator does not automatically create a running alert.
If a boundary passes while no bars arrive, delivery can be delayed or the warning can be missed. Recreate alerts after changing the settings or language that they should use.
**Scope and limitations**
This indicator provides a fixed-calendar overlay with descriptive historical statistics. Future dates are known because the calendar is predefined, not because future price information is available.
Active price boxes evolve with incoming bars. Completed-window statistics become available after the window ends and a subsequent bar arrives.
The script does not validate the economic explanation behind each period, establish causation, or guarantee that historical effects will persist.
Use it as an educational and analytical aid alongside independent analysis and risk management.
**English**
Highlights nine fixed seasonal periods, shows upcoming windows, and summarizes historical price changes and directional agreement for the selected instrument. Start with U.S. equity indices or ETFs on 1D; intraday charts are also supported. Provides calendar context, not trade signals or a live economic calendar.
**Русский**
Отмечает девять фиксированных сезонных периодов, показывает ближайшие окна и историческую статистику изменения цены и совпадения направления. Начните с фондовых индексов США или ETF на 1D; внутридневные графики также поддерживаются. Это календарный контекст, а не торговые сигналы или актуальное расписание экономических событий.
**Deutsch**
Markiert neun feste saisonale Zeitfenster und zeigt kommende Zeiträume sowie historische Kursveränderungen und die Übereinstimmung mit der erwarteten Richtung. Als Einstieg eignen sich US-Aktienindizes oder ETFs im Tageschart; Intraday-Charts werden ebenfalls unterstützt. Liefert saisonalen Kontext, keine Handelssignale und keinen aktuellen Wirtschaftskalender.
**Español**
Señala nueve períodos estacionales fijos y muestra los próximos períodos, la variación histórica del precio y la coincidencia con el sesgo previsto. Para empezar, utilice índices bursátiles estadounidenses o ETF en 1D; también admite gráficos intradía. Aporta contexto estacional, no señales de operativa ni un calendario económico actualizado.
**العربية**
يحدد تسع فترات موسمية ثابتة، ويعرض الفترات القادمة والتغيرات التاريخية للأسعار ومدى توافق اتجاهها مع الميل الموسمي المفترض. يُنصح بالبدء بمؤشرات الأسهم الأمريكية أو صناديق المؤشرات المتداولة على الإطار اليومي؛ كما يدعم الأطر الزمنية خلال اليوم. يقدم سياقًا موسميًا، وليس إشارات تداول أو تقويمًا اقتصاديًا محدثًا.
**中文(简体)**
标示九个固定的季节性时段,展示即将到来的时段、历史价格变动及其与预设方向的一致率。建议从美国股票指数或相关ETF的日线图开始,也支持日内周期。提供季节性背景参考,不提供交易信号,也不是实时经济日历。
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.