OPEN-SOURCE SCRIPT
Moon Cycles

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.
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.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.