Gann Sacred Geometry Hexagram Ver 1.2━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔯 GANN SACRED GEOMETRY HEXAGRAM v1.2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
A comprehensive technical analysis tool combining W.D. Gann's sacred geometry principles,
hexagram patterns, and advanced confluence scoring for high-probability trade signals.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📖 GANN THEORY BACKGROUND
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
W.D. Gann (1878-1955) believed markets move in geometric patterns and that price
and time must be in balance. His methods incorporated:
- The Square of Nine
- Geometric angles (1x1, 2x1, etc.)
- Sacred geometry and natural law
- Cycle theory and time divisions
- The principle "When time and price square, a change in trend is imminent"
This indicator applies these timeless principles with modern confluence analysis.
SACRED GEOMETRY FOUNDATION:
The hexagram (six-pointed star) is formed by two overlapping equilateral triangles:
- ▲ Upward triangle = Yang energy, bullish forces, expansion
- ▼ Downward triangle = Yin energy, bearish forces, contraction
When overlapped, they create the "Star of David" - representing perfect balance
between opposing market forces. Gann believed this geometry revealed natural
support and resistance zones where price would react.
HEXAGRAM IN MARKETS:
- 6 outer points = Major reversal zones
- Center point = Balance/equilibrium price
- Inner intersections = Secondary support/resistance
- The shape itself creates "harmonic" price levels
GANN'S SQUARE PHILOSOPHY:
"When time and price square, a change in trend is imminent."
- W.D. Gann
This indicator applies the "squaring" concept:
1. SPATIAL SQUARE: Grid cells are perfect squares in price-time space
2. TEMPORAL SQUARE: Time divisions (1/4, 1/2, 3/4) create cycle points
3. PRICE SQUARE: Price divisions (25%, 50%, 75%) mirror time divisions
4. GEOMETRIC SQUARE: All geometry radiates from perfect square centers
When price reaches a corner or edge of a square at a time cycle point,
the "squaring" of price and time creates a reversal probability zone.
PHI IN GANN GEOMETRY:
The Golden Ratio appears throughout natural phenomena and market structure.
This script uses φ in two primary ways:
1. INNER TRIANGLE SCALING:
- Outer triangles span the full cell (100%)
- Inner triangles scaled by φ⁻¹ (0.618 or 61.8%)
- This creates Fibonacci retracement levels geometrically
2. HARMONIC RESONANCE:
- φ ratio divides price space into natural harmony
- Markets tend to pause/reverse at these φ-scaled levels
- Combines Fibonacci analysis with Gann geometry
MATHEMATICAL RELATIONSHIP:
Inner Triangle Height = Outer Height × 0.618
Inner Triangle Width = Outer Width × 0.618
These create the 61.8% retracement levels automatically
within each grid cell's geometry.
GANN'S COMPLETE ANGLE SYSTEM:
Gann identified 9 primary angles that price follows. Each represents a different
relationship between price movement and time passage:
╔════════════════════════════════════════════════════════════════╗
║ ANGLE │ RATIO │ DEGREES │ MEANING ║
╠════════════════════════════════════════════════════════════════╣
║ 1x8 │ 1:8 │ 7.125° │ Very slow trend (gentle) ║
║ 1x4 │ 1:4 │ 14.036° │ Slow trend ║
║ 1x3 │ 1:3 │ 18.435° │ Moderate-slow trend ║
║ 1x2 │ 1:2 │ 26.565° │ Moderate trend ║
║ 1x1 │ 1:1 │ 45.000° │ MASTER ANGLE (most important) ║
║ 2x1 │ 2:1 │ 63.435° │ Strong trend ║
║ 3x1 │ 3:1 │ 71.565° │ Very strong trend ║
║ 4x1 │ 4:1 │ 75.964° │ Extreme trend ║
║ 8x1 │ 8:1 │ 82.875° │ Parabolic trend (unsustainable)║
╚════════════════════════════════════════════════════════════════╝
THE 1x1 ANGLE - THE MASTER:
- Most important angle in Gann theory
- Represents perfect balance: 1 unit price = 1 unit time
- When price is ABOVE 1x1 = Bullish control
- When price is BELOW 1x1 = Bearish control
- Crossing 1x1 = Major trend change signal
ANGLE FANS:
- From any pivot point, all 9 angles radiate outward
- Creates a "fan" of dynamic support/resistance
- Steeper angles (4x1, 8x1) = strong momentum resistance
- Gentler angles (1x4, 1x8) = weak support in downtrends
THE SACRED DIVISIONS OF TIME:
Gann divided all cycles into 8 equal parts, based on ancient geometry
and astrological principles:
CYCLE DIVISIONS (8ths):
┌─────────────────────────────────────────────────────┐
│ 1/8 = 12.5% │ First minor turn point │
│ 2/8 = 25.0% │ First major turn (Cardinal) │
│ 3/8 = 37.5% │ Second minor turn │
│ 4/8 = 50.0% │ MID-CYCLE (most powerful) │
│ 5/8 = 62.5% │ Third minor turn │
│ 6/8 = 75.0% │ Second major turn (Cardinal) │
│ 7/8 = 87.5% │ Fourth minor turn │
│ 8/8 = 100.0% │ CYCLE COMPLETION (reversal zone) │
└─────────────────────────────────────────────────────┘
WHY EIGHTHS?
- 8 is the number of balance in sacred geometry
- Octave divisions create harmonic resonance
- 360° circle ÷ 8 = 45° (the 1x1 master angle)
- Natural cycles show 8-fold symmetry
IN THIS SCRIPT:
When current time position is within 8% of any eighth division,
the "Gann 8ths Timing" factor activates, adding confluence points.
THE CARDINAL CROSS SYSTEM:
The Cardinal Cross divides any square into four equal quadrants,
creating a cross pattern:
100% ●━━━━━━━━━━━━━●
┃ ↑ ┃
75% ┃ SELL ZONE ┃ ← Resistance quadrant
┃ ↑ ┃
50% ●━━━━━●━━━━━━● ← EQUILIBRIUM (most important)
┃ ↓ ┃
25% ┃ BUY ZONE ┃ ← Support quadrant
┃ ↓ ┃
0% ●━━━━━━━━━━━━━●
PRICE LEVELS:
- 0% = Bottom support (grid cell low)
- 25% = Lower mid-level support
- 50% = PERFECT BALANCE - most powerful level
- 75% = Upper mid-level resistance
- 100% = Top resistance (grid cell high)
TIME DIVISIONS:
- 0% = Cycle start (grid cell left edge)
- 25% = First quarter turn
- 50% = Mid-cycle (most powerful timing)
- 75% = Third quarter turn
- 100% = Cycle completion (grid cell right edge)
CONFLUENCE MAGIC:
When BOTH price AND time align at cardinal points simultaneously:
Example: Price at 50% level + Time at 50% of cycle = Maximum power
This is the "squaring" Gann referred to.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 KEY FEATURES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Dynamic Grid System (1x1 to 7x7) - Automatically constructed from swing high to swing low
✅ Sacred Geometry Hexagrams - Overlapping triangles creating Star of David pattern
✅ Golden Ratio (φ = 1.618) Inner Triangles - Fibonacci harmony in geometry
✅ 9 Complete Gann Angles - 1x1, 2x1, 1x2, 3x1, 1x3, 4x1, 1x4, 8x1, 1x8
✅ Cardinal Cross Levels - 0%, 25%, 50%, 75%, 100% price divisions
✅ Gann 8ths Timing Cycles - 1/8, 1/4, 3/8, 1/2, 5/8, 3/4, 7/8 time divisions
✅ Price-Time Square Balance - Gann's principle of harmonious price-time relationship
✅ Advanced Confluence Scoring - Multi-factor signal validation (8-30 score range)
✅ Optimized Geometry Display - Shows full detail only near current price (reduces clutter)
✅ Customizable Visual Themes - Full color and thickness control
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 HOW IT WORKS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📍 GRID CONSTRUCTION:
The indicator identifies the most recent significant swing high-to-low movement using
configurable pivot periods (default: 88 bars). This creates the base "square" which is
then replicated in a grid pattern both vertically (price) and horizontally (time).
📐 SACRED GEOMETRY:
Each grid cell contains:
- Outer hexagram (Star of David) formed by two overlapping triangles
- Inner φ-ratio triangles scaled by the Golden Ratio
- Gann angles radiating from the center point
- Cardinal cross levels dividing price into quarters
🔍 CONFLUENCE SCORING SYSTEM:
Signals are generated when multiple Gann principles align:
1. Cardinal Cross Levels (0-6 points) - Price at key quarter divisions
2. Gann Angle Touches (0-5 points) - Price touching dynamic support/resistance angles
3. Angle Clustering (0-6 points) - Multiple angles converging = strong zone
4. Gann 8ths Timing (0-3 points) - At critical time cycle points
5. Price-Time Square (0-4 points) - Balanced price/time movement
6. Trend Alignment (0-3 points) - Signal direction matches trend
7. Grid Boundary Timing (0-3 points) - Near cell edges = reversal zones
8. φ Triangle Touches (0-2 points) - Golden ratio support/resistance
9. Reversal Patterns (0-2 points) - Wick rejections confirming reversal
Minimum confluence score of 15 required for signal (adjustable 8-30).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ RECOMMENDED SETTINGS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 For Daily Charts (Swing Trading):
- Gann Number: 88
- Grid Size: 4x4
- Confluence Score: 15
- Geometry Range: 5
- Trend Filter: ON
📊 For 4H Charts (Intraday):
- Gann Number: 44
- Grid Size: 3x3
- Confluence Score: 12-13
- Geometry Range: 3-4
- Trend Filter: ON
📊 For 15M Charts (Scalping):
- Gann Number: 22
- Grid Size: 2x2
- Confluence Score: 10-12
- Geometry Range: 2-3
- Allow Counter-Trend: Consider enabling
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📚 BEST PRACTICES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ Use higher confluence scores (15+) for higher probability trades
✓ Combine with volume analysis for confirmation
✓ Respect trend filter - signals with trend are stronger
✓ Watch for signals at grid boundaries (time cycle completions)
✓ Higher scores (20+) indicate exceptional setups
✓ Use alerts to catch signals in real-time
✓ Works best on liquid markets with clear swings
EXAMPLE 1: Strong Buy Signal (Score: 18)
✓ Price touched 50% level (6 pts)
✓ 1x1 Gann angle support (5 pts)
✓ At Gann 8th cycle point (3 pts)
✓ Price-Time squared (4 pts)
= High probability long entry
EXAMPLE 2: Medium Sell Signal (Score: 15)
✓ Price at 75% level (4 pts)
✓ 2x1 angle resistance (3 pts)
✓ Trend aligned downward (3 pts)
✓ Near grid boundary (3 pts)
✓ Bearish wick rejection (2 pts)
= Valid short entry
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎨 CUSTOMIZATION OPTIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- Structure: Gann Number (11, 22, 44, 88, 176, 352)
- Grid: Size from 1x1 to 7x7
- Geometry: Toggle squares, triangles, angles, levels
- Optimization: Show geometry only near price (performance boost)
- Thickness: All line widths adjustable (1-5)
- Colors: Full color customization for all elements
- Scoring: Adjust all tolerance and threshold parameters
- Timing: Enable/disable Gann 8ths, Price-Time Square
- Filters: Trend filter, boundary requirement, counter-trend signals
- Display: 4 signal styles (Labels, Diamonds, Circles, Stars)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT NOTES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- This indicator is for educational purposes
- Not financial advice - always do your own research
- Past performance does not guarantee future results
- Use proper risk management and position sizing
- Combine with other analysis methods for best results
- Grid redraws when new swing high/low forms
- Signals appear in real-time based on confluence scoring
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📞 SUPPORT & UPDATES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Follow for updates and improvements. Feedback welcome!
Version 1.2 - January 2025
- Optimized geometry rendering
- Enhanced confluence scoring
- Improved visual clarity
- Performance optimizations
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Hexagram
I Ching Hexagrams Part 2IMPORTANT!
Get the other indicator I Ching Hexagrams Part 1 for the full set!
Here is the first half of the I Ching's hexagrams.
Each candle generates a hexagram at close, based on that candle and the previous 5.
A green candle is yang and a red candle is yin.
In this way, price action generates a hexagram.
Use this to generate a hexagram for the day or even to find interesting patterns to trade.
Have fun!
I Ching Hexagrams Part 1IMPORTANT!
Get the other indicator I Ching Hexagrams Part 2 for the full set!
Here is the first half of the I Ching's hexagrams.
Each candle generates a hexagram at close, based on that candle and the previous 5.
A green candle is yang and a red candle is yin.
In this way, price action generates a hexagram.
Use this to generate a hexagram for the day or even to find interesting patterns to trade.
Have fun!


