Gann Square of Nine: Planetary Degrees█ Gann Square of Nine: Planetary Degrees maps planetary positions onto Gann's Square of Nine grid, tracking where pivot highs and lows accumulate by planetary degree. Use this indicator to identify recurring degree patterns on the So9, determine whether pivots cluster around cardinal, diagonal, or other significant angles, and project when the planet will return to those degrees.
Powered by the open-source BlueprintResearch Planetary Ephemeris library , which implements truncated VSOP87 (planets) and ELP2000 (Moon) series for high-accuracy celestial calculations entirely within Pine Script.
█ FEATURES
• Anchor Point System — Select any significant price pivot (high or low) as your reference point; all subsequent pivot tracking begins from this timestamp
• All 10 celestial bodies — Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto
• Geocentric or Heliocentric views — Toggle between Earth-centered (traditional) and Sun-centered perspectives
• Interactive Square of Nine table — Visual grid displaying the Gann spiral pattern with highlighted pivot degrees
• Automatic pivot detection — Configurable bar sensitivity to identify price pivots (symmetric left/right)
• Pivot degree labeling — Each detected pivot displays the planet's ecliptic longitude (0-360°) at that moment
• Target degree alerts — Define specific So9 degrees to watch; triggers alerts when the planet crosses them
• Preset So9 angles — Quick selection of degrees along major So9 lines (0°, 45°, 90°, 135°, 180°, 225°, 270°, 315°)
• Custom degree input — Enter any degrees as comma-separated or newline-separated values
• Future degree projections — Scans up to 500 bars ahead and shows when the planet will reach each target degree
• Retrograde indicator — Shows ℞ symbol with red text when planets are in apparent retrograde motion
• So9 overlay tools — Plot 90° and 45° angle relationships from any entered degree
█ HOW IT WORKS
The Square of Nine Concept:
Gann's Square of Nine is a spiral grid where numbers flow outward from the center (1) in a square spiral pattern. Key angle relationships (0°, 45°, 90°, etc.) align along specific diagonals and cardinal lines. When planetary degrees land on the same So9 position as significant price pivots, it suggests potential support/resistance levels.
This Indicator:
1. User selects an "anchor" timestamp at a significant price pivot
2. The indicator calculates the selected planet's ecliptic longitude (0-360°) at each bar
3. Price pivots detected after the anchor are labeled with their planetary degrees
4. These degrees accumulate on the So9 grid, revealing patterns
5. Target degrees can be set to receive alerts when crossed
6. Future projections show when the planet will reach those target degrees
█ HOW TO USE
1. Click on the anchor timestamp input and select a significant high or low pivot on your chart
2. Choose "High" or "Low" pivot type based on your anchor point
3. Select your planet from the dropdown
4. Choose Geocentric (traditional) or Heliocentric view
5. The So9 table appears showing accumulated pivot degrees highlighted
6. Set target degrees using presets or custom input to receive crossing alerts
7. Future projections appear as vertical lines with date/time labels
8. Use the So9 overlay tools to visualize angle relationships from specific degrees
█ VISUAL GUIDE
So9 Table Colors:
• Anchor degree: White (⚓ symbol)
• Current planet position: Planet's assigned color with symbol
• Pivot Highs: Green background
• Pivot Lows: Red background
• Equal (both high and low): Orange background
• Diagonal crosses: Blue background
• Cardinal crosses: Red background
• Target degrees: Yellow highlight
Chart Labels:
• Pivot High labels appear above the price with the degree
• Pivot Low labels appear below the price with the degree
• Future projection lines: Yellow (upcoming) or Gray (already crossed since anchor)
█ SETTINGS OVERVIEW
1. Anchor Point — Set the starting pivot timestamp and type (High/Low)
2. Planet Selection — Choose celestial body and coordinate system
3. Target Degree Alerts — Configure which degrees to watch and receive alerts
4. Pivot Detection — Set bar sensitivity for pivot high/low detection and degree rounding precision
5. Visual Style — Customize colors and label sizes
6. So9 Grid Overlay — Enter a degree to visualize its angular relationships
7. So9 Table — Position, sizing, and color options for the grid
8. So9 Diagonals — Toggle and color the diagonal/cardinal cross highlights
█ LIMITATIONS & ACCURACY
This indicator uses optimized VSOP87 and ELP2000 series tailored for Pine Script performance. It delivers excellent accuracy for trading and analytical purposes.
Expected Accuracy:
• Sun, Moon, Mercury, Venus, Mars: Within 1-10 arcseconds
• Jupiter, Saturn: Within 10-30 arcseconds
• Uranus, Neptune: Within 1-2 arcminutes
• Pluto: Simplified Meeus method (valid 1900-2100)
Degree Resolution:
The So9 grid uses integer degrees (1-361). Planetary positions are rounded to the nearest whole degree for grid placement. Precise decimal degrees are retained for crossing calculations and alerts.
Crossing Detection:
Future projection lines and background highlights both point to the confirmation bar—the first bar where the crossing can be verified. Alerts also trigger on this bar. This ensures all visual elements align consistently: when the chart reaches a future projection line, that bar closes with the crossing confirmed and highlighted.
█ CREDITS
• Square of Nine grid visualization adapted from ThiagoSchmitz's "Gann Square of 9" (Feb 2023)
• Ephemeris calculations via BlueprintResearch/lib_ephemeris open-source library
