PROTECTED SOURCE SCRIPT
Seasonality-by-Atrader

Seasonality Extended – Enhanced Historical Monthly Pattern Analysis
This script is a comprehensive extension of the original Seasonality concept, designed to analyze historical monthly returns of any asset on TradingView. It introduces advanced filtering, visualization, and usability features that significantly expand upon the capabilities of the original version.
Overview
The script calculates month-over-month percentage changes for each year, starting from a user-defined year. Results are displayed both on the chart as projected return boxes and in a data-rich heatmap table that highlights monthly trends, average returns, standard deviation, and the percentage of positive months.
Key Enhancements
- Year-Based Filtering
Users can selectively include:
- Only years ending in specific digits (e.g., 1, 3, 7)
- Only every n-th year (e.g., every 4th year from a reference year)
- Both filters can be combined for precise cycle isolation
- Exclusion of Irregular Periods
- Specific months can be excluded from the analysis using a date-based input (e.g., 2008-10, 2020-03)
- This allows users to remove outliers or crisis periods from historical performance data
- Enhanced Heatmap Display
- Adapts to year filters automatically
- Resizable via input fields for width and height
- Table can be positioned (left, center, or right)
- Optional summary rows for averages, standard deviations, and percentage of positive months
- Custom Color Configuration
- Separate color selection for positive and negative returns
- Customizable gradient intensity threshold
- Asset Compatibility
- Works across all TradingView-supported asset classes (stocks, indices, futures, crypto, forex)
- Supports multi-decade data where available (e.g., TVC:DXY from the 1970s)
- On-Chart Seasonality Projection
- Displays expected return zones for the current month based on historical data
- Shows projected price range and statistical context (standard deviation, sample size)
Use Cases
- Analyzing recurring seasonal behavior
- Isolating macro or election-cycle influences
- Informing strategic trade planning based on historical patterns
Limitations
- Table size is adjusted via inputs only (no mouse drag-resize)
- Analysis is based on monthly timeframes exclusively
- Chart object count is limited by TradingView’s standard restrictions
Summary
This script offers a refined and practical approach to seasonality analysis by enabling deep historical filtering, cycle-specific inclusion, and comprehensive tabular and visual output. It is tailored for analysts and traders looking to integrate long-term seasonal tendencies into their decision-making framework.
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用,没有任何限制 — 了解更多信息这里。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用,没有任何限制 — 了解更多信息这里。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。