OPEN-SOURCE SCRIPT
牛熊周期 (Crypto Bull/Bear Cycle)

Indicator: Crypto Bull/Bear Cycle Pro Max
Overview
This indicator is a powerful visualization tool designed to help traders understand and analyze the long-term cyclical nature of the cryptocurrency market, which is widely believed to follow a four-year pattern.
It automatically colors the chart's background to provide an immediate macro perspective, distinguishing between pre-configured "Bull Market" years (green) and "Bear Market" years (red). Beyond simple coloring, this all-in-one tool includes a fully customizable countdown timer to the next cycle transition, annual separator lines, and extensive options to tailor the visuals to your personal preference.
Key Features
* **Automatic Cycle Coloring:** The chart background is automatically shaded green for bull years and red for bear years, giving you an instant sentiment check.
* **Cycle Transition Countdown:** A non-intrusive info box displays the exact number of days remaining until the next cycle is set to begin (e.g., from a bear to a bull period).
* **Annual Separator Lines:** Draws a clean vertical line at the beginning of each year, making it easy to compartmentalize and analyze yearly price action.
* **Highly Customizable:** Nearly every visual element is under your control. Adjust colors, transparency, text sizes, line styles, and fine-tune the positioning of the info box to perfectly fit your chart layout.
* **Future-Proof:** The cycle years are stored in an array within the code, which can be easily edited to add future years or adjust to your own cycle theory.
How to Use
* **Macro Perspective:** Use the green (bull) and red (bear) backgrounds to quickly assess the historical market sentiment for the period you are analyzing.
* **Long-Term Planning:** Keep an eye on the countdown timer to stay aware of major potential turning points in the market, which can be crucial for long-term portfolio strategy.
* **Yearly Analysis:** Utilize the vertical separator lines to easily measure and compare performance on a year-by-year basis.
Settings and Customization
You can access the following settings by clicking the **Gear Icon (⚙️)** next to the indicator's name on your chart.
**1. Cycle Background Colors**
* **Bull Market Color:** Sets the color and transparency for the background during bull years.
* **Bear Market Color:** Sets the color and transparency for the background during bear years.
**2. Countdown Timer**
* **Show Countdown Timer:** A master switch to turn the info box on or off.
* **Style (Background Color, Text Color, Text Size):** Full control over the appearance of the info box and its text.
* **Position Fine-Tuning (X & Y Offset):**
* **X-Axis Offset (Horizontal):** A larger number pushes the info box further to the **left** from the right edge of the chart.
* **Y-Axis Offset (Vertical):** A larger number pushes the info box further **down** from the top edge of the chart.
**3. Year Separator Lines**
* **Show Year Separator Lines:** A switch to turn the vertical lines on or off.
* **Line Style (Separator Color, Style, Width):** Customize the appearance of the annual lines, including their color, style (Solid, Dashed, Dotted), and thickness.
---
**Note:** The bear years are predefined in the script's code on the line starting with `var int[] bear_years_array = ...`. By default, they are set to `2014, 2018, 2022, 2026,` etc. You can easily edit this line in the Pine Editor to add more years or modify the list if your cycle theory differs.
Overview
This indicator is a powerful visualization tool designed to help traders understand and analyze the long-term cyclical nature of the cryptocurrency market, which is widely believed to follow a four-year pattern.
It automatically colors the chart's background to provide an immediate macro perspective, distinguishing between pre-configured "Bull Market" years (green) and "Bear Market" years (red). Beyond simple coloring, this all-in-one tool includes a fully customizable countdown timer to the next cycle transition, annual separator lines, and extensive options to tailor the visuals to your personal preference.
Key Features
* **Automatic Cycle Coloring:** The chart background is automatically shaded green for bull years and red for bear years, giving you an instant sentiment check.
* **Cycle Transition Countdown:** A non-intrusive info box displays the exact number of days remaining until the next cycle is set to begin (e.g., from a bear to a bull period).
* **Annual Separator Lines:** Draws a clean vertical line at the beginning of each year, making it easy to compartmentalize and analyze yearly price action.
* **Highly Customizable:** Nearly every visual element is under your control. Adjust colors, transparency, text sizes, line styles, and fine-tune the positioning of the info box to perfectly fit your chart layout.
* **Future-Proof:** The cycle years are stored in an array within the code, which can be easily edited to add future years or adjust to your own cycle theory.
How to Use
* **Macro Perspective:** Use the green (bull) and red (bear) backgrounds to quickly assess the historical market sentiment for the period you are analyzing.
* **Long-Term Planning:** Keep an eye on the countdown timer to stay aware of major potential turning points in the market, which can be crucial for long-term portfolio strategy.
* **Yearly Analysis:** Utilize the vertical separator lines to easily measure and compare performance on a year-by-year basis.
Settings and Customization
You can access the following settings by clicking the **Gear Icon (⚙️)** next to the indicator's name on your chart.
**1. Cycle Background Colors**
* **Bull Market Color:** Sets the color and transparency for the background during bull years.
* **Bear Market Color:** Sets the color and transparency for the background during bear years.
**2. Countdown Timer**
* **Show Countdown Timer:** A master switch to turn the info box on or off.
* **Style (Background Color, Text Color, Text Size):** Full control over the appearance of the info box and its text.
* **Position Fine-Tuning (X & Y Offset):**
* **X-Axis Offset (Horizontal):** A larger number pushes the info box further to the **left** from the right edge of the chart.
* **Y-Axis Offset (Vertical):** A larger number pushes the info box further **down** from the top edge of the chart.
**3. Year Separator Lines**
* **Show Year Separator Lines:** A switch to turn the vertical lines on or off.
* **Line Style (Separator Color, Style, Width):** Customize the appearance of the annual lines, including their color, style (Solid, Dashed, Dotted), and thickness.
---
**Note:** The bear years are predefined in the script's code on the line starting with `var int[] bear_years_array = ...`. By default, they are set to `2014, 2018, 2022, 2026,` etc. You can easily edit this line in the Pine Editor to add more years or modify the list if your cycle theory differs.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.