PROTECTED SOURCE SCRIPT
Seasonality PH (Full History)

📊 Description
The "Seasonality PH (Full History)" indicator provides an in-depth analysis of the seasonal tendencies of a selected symbol by utilizing all available historical data. The indicator aggregates historical movements (Long/Short) and calculates the Expected Value (EV) for each period (Daily, Weekly, Monthly, Quarterly), offering a more robust view of the actual average gain/loss. The visualization is based on the Long/Short bar ratio (Bias) within the given period, where the column's height reflects the strength of the prevailing direction, and the direction (up/down) indicates the Long/Short bias. The indicator also includes a table with key statistics, including a prediction for the next 3 periods.
⚙️ Settings (Inputs)
Analysis
Data Range
Extras
Indexing
Dividers
Style
Conditional Coloring
Table
💡 Concepts and Interpretation
Seasonal Analysis and Bias
Expected Value (EV)
Performance Labels
Statistics Table
⚠️ Important Note
The "Seasonality PH (Full History)" indicator provides an in-depth analysis of the seasonal tendencies of a selected symbol by utilizing all available historical data. The indicator aggregates historical movements (Long/Short) and calculates the Expected Value (EV) for each period (Daily, Weekly, Monthly, Quarterly), offering a more robust view of the actual average gain/loss. The visualization is based on the Long/Short bar ratio (Bias) within the given period, where the column's height reflects the strength of the prevailing direction, and the direction (up/down) indicates the Long/Short bias. The indicator also includes a table with key statistics, including a prediction for the next 3 periods.
⚙️ Settings (Inputs)
Analysis
- Statistics Table: Display the summary table in the corner of the chart with key statistics.
- Performance Analysis: Display the main seasonal performance visualization as a histogram.
- Analysis Period: Select the period for analysis: Daily, Weekly, Monthly, or Quarterly.
- Seasonal Pivots: Displays the days when the asset tends to make annual seasonal highs/lows.
- Pivot Strength: The number of surrounding bars required to confirm a seasonal pivot (higher value = stronger pivot).
Data Range
- The indicator automatically utilizes all available history for the given instrument.
Extras
- Highlight Current Trading Day: Highlights the current period and extends its horizontal line to the right.
- Performance Labels: Displays labels on the columns. They include the % of the prevailing direction and the Expected Value (EV) in % for the period.
- Show S/L Ratio in Table: Displays the Short/Long ratio in the table.
- Track Changes: Connects the ends of the columns with a line to show the continuous change in Seasonal Bias.
Indexing
- Anchor to Beginning of Year: Anchors all seasonal drawings to the first trading day of the current year.
- Manual Offset: Enables manual offset to overlay seasonality onto previous years.
- Offset Value: The offset value in number of bars (e.g., 252 bars/year).
Dividers
- Month / Quarter: Enables visual separation of months or quarters in the Performance Analysis (with style and color selection).
Style
- Settings for colors and line thickness for the main visualizations. Includes colors for Performance (Long/Short), Seasonal Pivots, and Dividers.
Conditional Coloring
- Enable Conditional Bias Coloring: Activates conditional coloring of the columns.
- Bias % Threshold (0-100): The minimum percentage strength of the prevailing direction (e.g., 70%) that activates the solid color.
- High Long Bias Color / High Short Bias Color: Colors for periods with strong Long/Short bias.
Table
- Settings for the position, colors, and text size of the statistics table.
💡 Concepts and Interpretation
Seasonal Analysis and Bias
- Visualization: The main histogram shows the strength of the prevailing direction (Bias), not the average percentage change.
- Column Height: Normalized by the Long/Short bar ratio. A taller column means a stronger Long or Short bias.
- Column Direction: Up for Long Bias, Down for Short Bias.
- Conditional Coloring: If the Long/Short ratio exceeds the set Bias % Threshold, the column fills with a solid color to emphasize a strong bias.
Expected Value (EV)
- Definition: EV is a weighted average of the seasonal movement, considering both the probability of the movement (Long/Short ratio) and the average magnitude of these movements.
- Usage: This value represents the historical profit/loss expectation for the given period. It is displayed in the Performance Labels and in the table as Average % Change.
Performance Labels
- Top Number (%): The percentage of the prevailing direction (e.g., 75.00% Long).
- Bottom Number (%): The Expected Value (EV) for the period in percent.
Statistics Table
- Data Collected: The number of years from which data has been collected.
- Average % Change: The Expected Value (EV) for the current period.
- Current % Change: The actual percentage change of the current, yet-to-be-closed, period.
- Prediction Next 3: The average Expected Value (EV) for the next 3 periods (a quick seasonal outlook).
⚠️ Important Note
- Timeframe: For correct aggregation and accurate results, the chart must be set to the Daily (D) timeframe.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.