Pythagorean Time Price Geometry Ver 1.0Pythagorean Time Price Geometry — Ver 1.0
By Timepricedecoder
Overview
This indicator applies W.D. Gann's Time = Price principle using Pythagorean geometry to project natural time cycles and price grid levels directly on the chart.
Gann believed that financial markets move in geometric harmony — that price and time are not independent variables, but two sides of the same equation. When they balance, the market reaches a natural turning point.
This script operationalises that idea using the Pythagorean theorem — the ancient mathematical relationship where in a right-angled triangle, the square of the hypotenuse equals the sum of squares of the other two sides (a² + b² = c²). In market terms:
Side A (time) — the number of bars in the anchor swing
Side B (price) — the range of the anchor swing (High − Low)
Side C (hypotenuse) — the natural cycle projection derived from both
By selecting a Pythagorean Triple (sets of whole numbers satisfying a² + b² = c², such as 3-4-5, 5-12-13, 8-15-17), the script scales the time-price relationship into a precise geometric ratio. This ratio then defines the grid cell size, the cycle length, and the angle of the diagonal — all derived from a single anchor swing.
The result is a self-organising grid that maps where price should find support or resistance, and when time cycles are due to complete — giving the trader a structured, geometry-based framework rather than arbitrary indicator levels.
When time and price arrive at the same Pythagorean node simultaneously — the market is squaring — and that is where the highest-probability signals are generated.
Core Concepts
Time = Price Squaring
Price range and time duration are treated as the two legs of a right triangle. When they balance — the market is at a Square — reversals or accelerations are most likely.
Pythagorean Nodes
From the anchor swing (High → Low or Low → High), the script calculates:
Sq — Square of the swing (time leg = price leg). Highest grade signal
Hyp — Hypotenuse projection. Major cycle marker
½Hyp — Half Hypotenuse. Minor cycle node
½Sq — Early warning zone
These project forward as repeating time cycles across the chart.
Harmonic Grid
Price is divided into cells derived from the Pythagorean triple ratio (B/A × Range). The grid repeats both in time (columns) and price (rows), creating a natural map of support, resistance, and time confluence.
Signal Tiers
🟨 BUY/SELL-Sq — Time node + Price grid level align. Strongest signal
🟩 BUY/SELL-T — Time node only. Moderate signal
⬜ BUY/SELL-P — Price grid level only. Weakest, disabled by default
Confluence Zones ⚡
⚡ — Quarter cycle node
⚡⚡ — Half cycle node
⚡⚡⚡ — Full cycle node (highest confluence)
Recommended Settings
StyleGann NumberDivisorTripleSwing WidthScalping221/44-3-5NarrowShort Term441/24-3-5NormalMedium Term881/23-4-5NormalLong Term176Full3-4-5Wide
InstrumentType SettingNotesOptionsOptionsGrid origin auto-adjustedIndicesIndicesUse 88, 1/2 divisorStocksStocksUse Adaptive stabilityFuturesFuturesUse 44 or 88
Grid Stability
Strict — Anchors rarely shift. Best for trending markets
Adaptive — Default. Balances stability and responsiveness
Relaxed — Reanchors more freely. Best for ranging markets
How To Use
Let the script auto-detect the swing anchor (or set manually)
Watch for Sq labels on vertical cycle lines — these are key dates
Enter on BUY-Sq / SELL-Sq signals with candle confirmation
Use ⚡⚡⚡ confluence zones as high-alert turning point windows
The active zone box shows current grid cell position (Upper = bullish bias, Lower = bearish bias)
Disclaimer
This script is published for educational purposes only. It does not constitute financial advice. Past signal accuracy does not guarantee future results. The swing detection uses Daily OHLC data with lookahead enabled — results may differ slightly on live bars versus historical bars. Always use proper risk management. Trade at your own risk.
Pine Script® Indikator





