OPEN-SOURCE SCRIPT
Seasonality Advanced [Open]

[English]
Description
The Seasonality Advanced [Open] is a professional-grade Seasonality Analysis tool designed to project future price trends based on historical cyclical patterns. By releasing this script as Open-Source, traders and developers can study its underlying logic, particularly the array-based multi-cycle alignment and the statistical engine.
Unlike simple seasonal indicators that just average price, this script offers a statistical approach with a "Zero Gravity" (Joyplot-style) visualization mode and a real-time Data Dashboard.
Underlying Concepts & Methodology
The script calculates the seasonal tendency by averaging the price performance of the same day/week over a user-defined lookback period (e.g., 5, 10, or 15 years).
Data Alignment: It aligns historical data using arrays based on trading days or calendar days to create a coherent "Annual Cycle".
Smoothing: A Moving Average is applied to the raw seasonal data to filter out noise and reveal the true macro tendency.
Correlation Engine: It calculates the real-time Pearson correlation between the current price action and the projected seasonal line. This acts as a "Lie Detector"—if correlation is high, the seasonal pattern is currently valid.
Key Features
Multi-Cycle Analysis: Plot up to 3 different seasonal baselines simultaneously.
Zero Gravity View: Uses a dynamic separation algorithm to prevent lines from overlapping messily, making it easier to compare different cycles without cluttering the main price action.
Statistical Dashboard: A built-in table displays Avg Return, WinRate, Volatility Risk (Standard Deviation), and Correlation for each cycle.
How to Use
Projections: Use the lines extending into the future to anticipate potential turning points.
Filter: Watch the "Correlation" column in the table. Low or negative correlation means the current market is decoupling from history, so the seasonal signal should be ignored.
[English Translation of User Interface]
To comply with House Rules regarding non-English UI, here is the translation of the script's settings menu:
1. Cálculos Sazo 3 (Calculation Settings)
Dias de negociação = Trading Days (Fixed 252 or Variable)
Método de dias = Day Count Method (Min, Max, Avg)
Projeção Futura (Barras) = Future Projection (Bars)
Suavização (Média) = Smoothing (MA Length)
Deslocamento = Offset
2. Visualização e Layout (Visuals)
Empilhamento / Separação (%) = Stacking / Separation %
Distância Vertical = Vertical Distance
Distância da Etiqueta = Label Offset
3. Painel Estatístico (Statistics Panel)
Mostrar Tabela = Show Table
Mostrar Próximo Mês = Show Next Month
Mostrar Linha Méd/Alvo = Show Avg/Target Row
Texto Suave = Soft Text (Transparency)
Período Correlação = Correlation Period
Tema = Theme (Dark/Light)
Tamanho = Size
Posição = Position
4. Linha de Hoje (Today's Line)
Mostrar Linha = Show Vertical Line
Cor/Estilo/Espessura = Color/Style/Width
5. Linhas 1, 2, 3 (Seasonal Lines)
Ativar Linha = Enable Line
Período (anos) = Lookback Period (Years)
Cor/Estilo/Espessura = Color/Style/Width
[Português]
Descrição
O Seasonality Advanced agora é open-source! Esta é uma ferramenta completa de Sazonalidade que projeta tendências futuras baseadas em padrões históricos de 5, 10 ou 15 anos. Ele inclui um painel estatístico exclusivo que mostra a probabilidade de acerto (WinRate), risco e a correlação do ciclo atual com o passado.
Funcionalidades
Projeção Futura: Desenha o comportamento provável do preço para as próximas semanas.
Painel Estatístico: Mostra retorno médio, risco e correlação em tempo real.
Zero Gravity: Visualização empilhada para facilitar a leitura de múltiplos ciclos sem poluir o gráfico.
Description
The Seasonality Advanced [Open] is a professional-grade Seasonality Analysis tool designed to project future price trends based on historical cyclical patterns. By releasing this script as Open-Source, traders and developers can study its underlying logic, particularly the array-based multi-cycle alignment and the statistical engine.
Unlike simple seasonal indicators that just average price, this script offers a statistical approach with a "Zero Gravity" (Joyplot-style) visualization mode and a real-time Data Dashboard.
Underlying Concepts & Methodology
The script calculates the seasonal tendency by averaging the price performance of the same day/week over a user-defined lookback period (e.g., 5, 10, or 15 years).
Data Alignment: It aligns historical data using arrays based on trading days or calendar days to create a coherent "Annual Cycle".
Smoothing: A Moving Average is applied to the raw seasonal data to filter out noise and reveal the true macro tendency.
Correlation Engine: It calculates the real-time Pearson correlation between the current price action and the projected seasonal line. This acts as a "Lie Detector"—if correlation is high, the seasonal pattern is currently valid.
Key Features
Multi-Cycle Analysis: Plot up to 3 different seasonal baselines simultaneously.
Zero Gravity View: Uses a dynamic separation algorithm to prevent lines from overlapping messily, making it easier to compare different cycles without cluttering the main price action.
Statistical Dashboard: A built-in table displays Avg Return, WinRate, Volatility Risk (Standard Deviation), and Correlation for each cycle.
How to Use
Projections: Use the lines extending into the future to anticipate potential turning points.
Filter: Watch the "Correlation" column in the table. Low or negative correlation means the current market is decoupling from history, so the seasonal signal should be ignored.
[English Translation of User Interface]
To comply with House Rules regarding non-English UI, here is the translation of the script's settings menu:
1. Cálculos Sazo 3 (Calculation Settings)
Dias de negociação = Trading Days (Fixed 252 or Variable)
Método de dias = Day Count Method (Min, Max, Avg)
Projeção Futura (Barras) = Future Projection (Bars)
Suavização (Média) = Smoothing (MA Length)
Deslocamento = Offset
2. Visualização e Layout (Visuals)
Empilhamento / Separação (%) = Stacking / Separation %
Distância Vertical = Vertical Distance
Distância da Etiqueta = Label Offset
3. Painel Estatístico (Statistics Panel)
Mostrar Tabela = Show Table
Mostrar Próximo Mês = Show Next Month
Mostrar Linha Méd/Alvo = Show Avg/Target Row
Texto Suave = Soft Text (Transparency)
Período Correlação = Correlation Period
Tema = Theme (Dark/Light)
Tamanho = Size
Posição = Position
4. Linha de Hoje (Today's Line)
Mostrar Linha = Show Vertical Line
Cor/Estilo/Espessura = Color/Style/Width
5. Linhas 1, 2, 3 (Seasonal Lines)
Ativar Linha = Enable Line
Período (anos) = Lookback Period (Years)
Cor/Estilo/Espessura = Color/Style/Width
[Português]
Descrição
O Seasonality Advanced agora é open-source! Esta é uma ferramenta completa de Sazonalidade que projeta tendências futuras baseadas em padrões históricos de 5, 10 ou 15 anos. Ele inclui um painel estatístico exclusivo que mostra a probabilidade de acerto (WinRate), risco e a correlação do ciclo atual com o passado.
Funcionalidades
Projeção Futura: Desenha o comportamento provável do preço para as próximas semanas.
Painel Estatístico: Mostra retorno médio, risco e correlação em tempo real.
Zero Gravity: Visualização empilhada para facilitar a leitura de múltiplos ciclos sem poluir o gráfico.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。