PROTECTED SOURCE SCRIPT
Seasonality

Seasonality Analysis
This script is a technical tool designed to identify and project historical price cycles onto the current chart. It calculates the average price movement for specific time intervals (days, weeks, or months) over a multi-year lookback period to highlight recurring seasonal patterns.
Technical Features
Historical Averaging: Aggregates price deltas ($Close - Close[1]$) for each calendar "slot" (e.g., Trading Day 1–252) over a user-defined period (up to 30 years).
Multi-Timeframe Support: Automatically adapts to Daily (252 days), Weekly (52 weeks), or Monthly (12 months) intervals.
De-trending: Removes long-term linear bias from the data to isolate pure seasonal oscillations, ensuring the curve reflects cyclicality rather than just long-term trend.
Dynamic Scaling: Automatically scales the seasonal curve to match the price range of the currently visible bars for better visual alignment.
Future Projection: Plots the historical seasonal expectation into the future (the "empty" space to the right) to assist in cyclical forecasting.
Key Inputs
Lookback Period: Number of years included in the statistical average.
Smoothing (MA): Optional moving average applied to the seasonal curve to filter out noise.
Trading Days: Toggle between fixed (252) or variable calculation (useful for 24/7 or OTC markets).
Disclaimer: Past performance is not indicative of future results. Seasonality represents a statistical average of historical data and should not be used as a standalone signal for trading. Market conditions change, and historical cycles may fail to repeat due to fundamental shifts, black swan events, or changing market regimes. Use this tool only as a secondary filter within a comprehensive risk management strategy.
This script is a technical tool designed to identify and project historical price cycles onto the current chart. It calculates the average price movement for specific time intervals (days, weeks, or months) over a multi-year lookback period to highlight recurring seasonal patterns.
Technical Features
Historical Averaging: Aggregates price deltas ($Close - Close[1]$) for each calendar "slot" (e.g., Trading Day 1–252) over a user-defined period (up to 30 years).
Multi-Timeframe Support: Automatically adapts to Daily (252 days), Weekly (52 weeks), or Monthly (12 months) intervals.
De-trending: Removes long-term linear bias from the data to isolate pure seasonal oscillations, ensuring the curve reflects cyclicality rather than just long-term trend.
Dynamic Scaling: Automatically scales the seasonal curve to match the price range of the currently visible bars for better visual alignment.
Future Projection: Plots the historical seasonal expectation into the future (the "empty" space to the right) to assist in cyclical forecasting.
Key Inputs
Lookback Period: Number of years included in the statistical average.
Smoothing (MA): Optional moving average applied to the seasonal curve to filter out noise.
Trading Days: Toggle between fixed (252) or variable calculation (useful for 24/7 or OTC markets).
Disclaimer: Past performance is not indicative of future results. Seasonality represents a statistical average of historical data and should not be used as a standalone signal for trading. Market conditions change, and historical cycles may fail to repeat due to fundamental shifts, black swan events, or changing market regimes. Use this tool only as a secondary filter within a comprehensive risk management strategy.
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用,没有任何限制 — 了解更多信息这里。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用,没有任何限制 — 了解更多信息这里。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。