OPEN-SOURCE SCRIPT
First X Days Of A Year

First X-Day Indicator
Overview
The "First X-Day Indicator" is a powerful tool to visualize and analyze market sentiment during the crucial first trading days of each new year. It provides immediate visual feedback on whether the year is starting with positive or negative momentum compared to the previous year's close, a concept often related to market theories like the "January Effect" or the "First Five Days Rule."
The indicator is designed to be clean, intuitive, and fully customizable to fit your charting style.
Key Features
Settings & Customization
You have full control over all visual elements:
Overview
The "First X-Day Indicator" is a powerful tool to visualize and analyze market sentiment during the crucial first trading days of each new year. It provides immediate visual feedback on whether the year is starting with positive or negative momentum compared to the previous year's close, a concept often related to market theories like the "January Effect" or the "First Five Days Rule."
The indicator is designed to be clean, intuitive, and fully customizable to fit your charting style.
Key Features
- Yearly Baseline: Automatically draws a horizontal line at the previous year's closing price. This line serves as a clear 0% reference for the current year's performance.
- Dynamic Background Coloring: For a user-defined number of days at the start of the year, the chart background is colored daily. Green indicates the close is above the previous year's close, while red indicates it's below.
- Final Performance Symbol: At the end of the analysis period (e.g., on the 5th day), a single summary symbol (like 👍 or 👎) appears. This symbol represents the final performance outcome of the initial trading period.
Settings & Customization
You have full control over all visual elements:
- Analysis Period: Define exactly how many days at the start of the year you want to analyze (e.g., 3, 5, or 10 days).
- Line Customization:Fully control the yearly baseline's appearance. You can change its color, width, and style (Solid, Dashed, or Dotted) or hide it completely.
- Symbol Customization: Choose any character or emoji for the positive and negative performance symbols. You can also adjust their size (Small, Normal, Large) or hide them.
- Background Control: Enable or disable the daily background coloring and select your preferred custom colors for positive and negative days.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。