OPEN-SOURCE SCRIPT

Zfx Lunar Phase Engine

331

Zfx — Lunar Phase Engine

This indicator maps the synodic lunar cycle directly onto your price chart using precise astronomical timing. The lunar wave is calculated from a verified new moon epoch and plotted as a smooth sine oscillator on the left scale, allowing you to overlay the natural 29.5-day moon cycle against any market on any timeframe — without cluttering your price action.

What it does:
- Computes real-time lunar phase (0 = New Moon → 0.5 = Full Moon → 1 = back to New Moon) using the synodic month constant (2,551,442 seconds)
- Plots the wave on the left scale directly over price — candles remain fully readable
- Marks all four lunar phases with vertical lines and emoji anchors: 🌑 New Moon (cyan), 🌓 First Quarter, 🌕 Full Moon (gold), 🌗 Third Quarter
- Projects the next 3 upcoming phase events forward in time as dashed future lines
- Displays a live data table: current illumination % and days until the next New/Full Moon
- Optional waxing/waning background shading

Why it matters:
Lunar cycles have been studied in relation to market sentiment, liquidity windows, and turning points across commodities, indices, and crypto. This tool makes it effortless to visually correlate price behaviour with the moon's phase without any manual calculation.

Settings:
- Toggle quarter moon markers on/off
- Toggle background shading on/off
- Toggle the data table on/off
- All alert conditions included for all 4 phase transitions

Built for clean, uncluttered overlay use on any symbol and any timeframe.

---

That framing is distinct enough — it emphasises the astronomical calculation, the overlay approach, the left-scale design, and the forward projection, which differentiates it from generic lunar scripts.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.