OPEN-SOURCE SCRIPT

Planetary Aspects [BlueprintResearch]

345
█ Planetary Aspects is a focused-pair aspect detector for financial astrology. Select any two celestial bodies — planets, luminaries, or lunar nodes — and the indicator identifies every aspect passage directly on your chart, with exact-moment markers, background orb bands, and forward-looking projections.

Designed as the on-chart companion to Natal & Transit Planetary Aspect Table, which displays the full cross-aspect matrix in table form. Use both together for complete aspect coverage: the table for the big picture and this indicator for deep analysis of a single pair.

Supports both geocentric and heliocentric coordinates with high-accuracy ephemeris calculations. Powered by the open-source Blueprint Ephemeris library (VSOP87D + ELP2000-82 + Meeus) — all planetary positions computed directly in Pine Script, no external data required. Validated against NASA's DE440 ephemeris: all bodies under 0.1° RMS (Sun 0.004°, planets 0.005°–0.017°, Moon 0.062°, Pluto 0.059°).

What is an aspect?
An aspect is a specific angular separation between two celestial bodies as viewed from Earth (geocentric) or the Sun (heliocentric). When two planets reach an exact aspect angle — such as 0° (conjunction), 90° (square), or 180° (opposition) — astrologers consider it a moment of significance. Financial astrologers use these geometric alignments as potential timing markers for trend changes, volatility shifts, or turning points in price action.


█ FEATURES

Dual Mode Operation
Transit Aspects — Compare two currently transiting planets in real time
Natal Aspects — Compare a transiting planet against a natal (first-trade) position, with 20+ built-in presets for crypto, commodities, currencies, bonds, and indexes

13 Configurable Aspect Types
• Major: ☌ Conjunction · ☍ Opposition · △ Trine · □ Square · ⚹ Sextile
• Minor: ⚺ Semi-Sextile · ⚻ Quincunx · ∠ Semi-Square · ⚼ Sesquiquadrate · Q Quintile · bQ Biquintile · S Septile · N Novile
• Each aspect has its own toggle, orb (1°–15°), and color

12 Celestial Bodies
• ☉ Sun · ☽ Moon · ☿ Mercury · ♀ Venus · ♂ Mars · ♃ Jupiter · ♄ Saturn · ♅ Uranus · ♆ Neptune · ♇ Pluto
• ☊ North Node · ☋ South Node (mean lunar nodes)

Visual System
Exact-moment markers — Aspect symbol labels placed at the precise bar where the orb begins widening (inflection point), with retrograde ℞ notation
Background orb bands — Gradient-transparency bgcolor that intensifies as the aspect tightens toward exact
Future projections — Dashed lines, date labels, and gradient orb boxes extending up to 500 bars into the future
Zodiac positions — Tooltips show each planet's sign, degree, and arc-minute (e.g., 15°30' ♈)
Info table — Compact top-right summary showing mode, pair, coordinate system, and active aspects at a glance

Smart Detection
• Exact-moment dedup prevents duplicate labels within the same aspect passage
• Retrograde re-approach detection — if a planet retrogrades back into orb, a new label fires
• Confirmed-bar alerts — alerts only fire on confirmed bars to prevent repainting
• Geocentric/heliocentric toggle with a single checkbox


█ HOW TO USE

1. Choose Transit Aspects or Natal Aspects mode.

2. Select Planet A and Planet B from the dropdowns.
In Natal mode, Planet A is the transiting body and Planet B is the natal position.

3. If using Natal mode, select a preset first-trade date or enter a custom one.
Presets include BTC, ETH, DOGE, NYSE, DJIA, S&P 500, Gold, Crude Oil, Wheat, and more.

4. Enable or disable individual aspects and adjust orbs to your preference.
Aspects (conjunction through sextile) are enabled by default; minor aspects are disabled by default.

5. Optionally enable future projections to view upcoming aspect passages before they occur.

6. Set up alerts via TradingView's alert dialog — the indicator provides a non-repainting "Exact Aspect Detected" condition.


█ NOTES

Geocentric elongation Constraints
In geocentric mode, inferior planets (those orbiting closer to the Sun than Earth) have a maximum angular separation from the Sun:
• ☉ Sun ↔ ☿ Mercury — max ~28° (only conjunction is reliably possible)
• ☉ Sun ↔ ♀ Venus — max ~47° (conjunction through semi-square)
• ☿ Mercury ↔ ♀ Venus — max ~75° (conjunction through quintile)
Aspects beyond these limits (e.g., Sun–Mercury opposition) will never occur. This is an astronomical reality, not a bug. All other planet pairs can form any aspect. In heliocentric mode, these constraints do not apply.

Lunar Nodes
This indicator uses mean lunar nodes. By definition, the North Node (☊) and South Node (☋) are always 180° apart, so the ☊ ↔ ☋ pair is automatically skipped — their opposition is permanent, not a transient event.

Companion Indicator
For a complete cross-aspect matrix of all planets at once, use Natal & Transit Planetary Aspect Table with this indicator. The table shows every active aspect across all planet pairs; this indicator provides detailed on-chart analysis for the specific pair you want to study.


█ KNOWN LIMITATIONS & TIPS
• TradingView limits drawing objects to 500 per category (lines, labels, boxes). On long histories — such as the full DJIA dataset — you may hit this cap. If labels run out, the background color should persist.
• On weekly and monthly timeframes, fast-moving planets (Sun, Mercury, Venus) can pass through an entire orb window within a single bar. Consider widening the orb or dropping to daily for these pairs.
• Future projections are computed on the last bar only and increase processing time at higher look-ahead values.


█ CREDITS
Built on the open-source Blueprint Ephemeris library by BlueprintResearch.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.