PROTECTED SOURCE SCRIPT

UTT NEW MOON

500
The script first calculates the day of the year and then uses astronomical formulas to approximate the Moon’s phase at the given time. From these calculations it determines the last Moon phase event and classifies it as either a New Moon (phase +1) or a Full Moon (phase −1).
It adjusts the result so the phase only changes when a new lunar event occurs, then returns two values: the current phase state and a “moonType” that signals when a new event (New or Full Moon) appears.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.