OPEN-SOURCE SCRIPT

Moon Cycles

115
Overview
Marks the four primary lunar phases (new, first quarter, full, last quarter) directly on the chart using an astronomical calculation, for traders who track lunar-cycle-based market sentiment/timing frameworks.

How it's calculated
Uses the standard synodic month constant (29.530588853 days) against a known reference new moon (6 Jan 2000) to compute a continuous lunar-cycle phase fraction (0 to 1) for the current bar's timestamp, then flags a phase transition whenever that fraction crosses a phase boundary (0.0 = new, 0.25 = first quarter, 0.5 = full, 0.75 = last quarter) between the current and prior bar.

How to use it
This isn't a trading signal on its own — it's a calendar overlay for traders who want lunar phases visible alongside price action as one input among others. Label text is configurable (emoji only, with meaning, with date, or all three) and vertical lines can optionally mark new/full moons for easier visual alignment with price swings.

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.