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
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.