OPEN-SOURCE SCRIPT
Decennial Pattern Projection

This tool was created to map out a "blueprint" for future market movements based on historical cycles.
**Important Prerequisite: Monthly Timeframe Only**
First and foremost, this indicator is designed exclusively for **monthly charts**.
If applied to other timeframes—such as daily or weekly charts—it is programmed to intentionally stop functioning and display an error message ("This indicator requires a Monthly timeframe") to prevent coordinate misalignment or redundant data calculations. Please ensure you use it only on monthly charts.
**Indicator Overview and Usage**
This indicator extracts the "10-year cycle pattern"—a classic market anomaly where performance trends align based on the last digit of the calendar year. It then plots a projected future trajectory—showing the "average year-to-date (YTD) movement (%)"—directly onto the chart for the specified year (and the following year).
**Practical Trading Applications**
**Grasping Broad Seasonality**
You can visually identify seasonal rhythms—such as which months tend to mark market bottoms or whether prices often weaken in early autumn—for years ending in a specific digit. This helps reduce the risk of unnecessary contrarian trades and allows you to formulate trading plans that align with historical capital flow patterns.
**Can it be used for entry and exit timing?**
This line does not generate direct buy/sell signals (such as arrows). However, it serves as a tool to gauge market strength and inform strategy when seasonal patterns are pronounced—such as considering long positions during "statistically strong months" or lightening positions (or switching to short strategies) during "weak months." It also helps you determine if the market is deviating from the anomaly due to specific, overriding biases.
**Improving Accuracy by Excluding "Black Swan" Events**
If you believe that outlier data from specific years—such as the 2008 Lehman Shock or the 2020 COVID-19 crash—is skewing the average, you can exclude those years via the settings. As this is a matter of individual judgment, one might choose not to exclude it if one views it as an inevitable occurrence aligned with cycles of debt or similar obligations.
**Important Prerequisite: Monthly Timeframe Only**
First and foremost, this indicator is designed exclusively for **monthly charts**.
If applied to other timeframes—such as daily or weekly charts—it is programmed to intentionally stop functioning and display an error message ("This indicator requires a Monthly timeframe") to prevent coordinate misalignment or redundant data calculations. Please ensure you use it only on monthly charts.
**Indicator Overview and Usage**
This indicator extracts the "10-year cycle pattern"—a classic market anomaly where performance trends align based on the last digit of the calendar year. It then plots a projected future trajectory—showing the "average year-to-date (YTD) movement (%)"—directly onto the chart for the specified year (and the following year).
**Practical Trading Applications**
**Grasping Broad Seasonality**
You can visually identify seasonal rhythms—such as which months tend to mark market bottoms or whether prices often weaken in early autumn—for years ending in a specific digit. This helps reduce the risk of unnecessary contrarian trades and allows you to formulate trading plans that align with historical capital flow patterns.
**Can it be used for entry and exit timing?**
This line does not generate direct buy/sell signals (such as arrows). However, it serves as a tool to gauge market strength and inform strategy when seasonal patterns are pronounced—such as considering long positions during "statistically strong months" or lightening positions (or switching to short strategies) during "weak months." It also helps you determine if the market is deviating from the anomaly due to specific, overriding biases.
**Improving Accuracy by Excluding "Black Swan" Events**
If you believe that outlier data from specific years—such as the 2008 Lehman Shock or the 2020 COVID-19 crash—is skewing the average, you can exclude those years via the settings. As this is a matter of individual judgment, one might choose not to exclude it if one views it as an inevitable occurrence aligned with cycles of debt or similar obligations.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.