OPEN-SOURCE SCRIPT
Gann Static Step-Cycle (Two-Way) v.3

This Pine Script indicator implements a Static Step-Cycle logic based on the Gann Square of 9, specifically designed to track price movements relative to a fixed "Anchor" (like an All-Time High) through 360° cycles.
Core Mechanism: Static vs. Dynamic
Unlike most indicators that recalculate with every new swing, this script remains Static. It stays fixed on an Anchor price (e.g., 25,476.40) and only updates when price completes a full 360° vibration.
Step-by-Step Working
1. Anchoring and Initialization
The script starts with a user-defined ath_price (Anchor).
It calculates the square root of this anchor to find its base vibration: \sqrt{\text{Anchor}}.
2. The Shift Logic (The "Step" System)
This is the heart of the indicator. It defines a "trading box" of one full Gann cycle:
Upper Boundary (+360°): calculated as (\sqrt{\text{Anchor}} + 2)^2.
Lower Boundary (-360°): calculated as (\sqrt{\text{Anchor}} - 2)^2.
The Shift: If the price closes above the +360° line or below the -360° line, the indicator "steps" up or down. That boundary becomes the new Anchor, and a fresh set of levels is plotted.
3. Calculating Gann Degrees (Vibrations)
Within the active cycle, the script plots specific geometric angles:
90° (Cardinal): Root increment of \pm 0.5.
180° (Opposition): Root increment of \pm 1.0.
270° (1.5 Vibration): Root increment of -1.5. In Gann theory, this is known as the "Trend Exhaustion" or "Death Zone," often coinciding with the end of an Elliott Wave 5.
Key Features for Trading
Core Mechanism: Static vs. Dynamic
Unlike most indicators that recalculate with every new swing, this script remains Static. It stays fixed on an Anchor price (e.g., 25,476.40) and only updates when price completes a full 360° vibration.
Step-by-Step Working
1. Anchoring and Initialization
The script starts with a user-defined ath_price (Anchor).
It calculates the square root of this anchor to find its base vibration: \sqrt{\text{Anchor}}.
2. The Shift Logic (The "Step" System)
This is the heart of the indicator. It defines a "trading box" of one full Gann cycle:
Upper Boundary (+360°): calculated as (\sqrt{\text{Anchor}} + 2)^2.
Lower Boundary (-360°): calculated as (\sqrt{\text{Anchor}} - 2)^2.
The Shift: If the price closes above the +360° line or below the -360° line, the indicator "steps" up or down. That boundary becomes the new Anchor, and a fresh set of levels is plotted.
3. Calculating Gann Degrees (Vibrations)
Within the active cycle, the script plots specific geometric angles:
90° (Cardinal): Root increment of \pm 0.5.
180° (Opposition): Root increment of \pm 1.0.
270° (1.5 Vibration): Root increment of -1.5. In Gann theory, this is known as the "Trend Exhaustion" or "Death Zone," often coinciding with the end of an Elliott Wave 5.
Key Features for Trading
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。