Tool
Lunar Phase
interpretor.lunar_phase
Inputs
The lunar info bundle from a market.lunar_phase node, carrying the current phase, phase angle, and declination.
Outputs
A boolean that is true on each bar the Moon matches the chosen phase, angle window, or declination extreme.
Lunar Phase is a yes/no gate that fires when the Moon is at or near a chosen phase, inside a phase-angle window, or at a declination extreme. The Moon's cycle is the one corner of financial astrology with modest supporting evidence, so it's a popular timing filter.
How it works
It reads the info bundle from a market.lunar_phase node and outputs a BOOL. Depending on mode it checks an exact named phase, whether the Sun-Moon phase angle falls inside a band of half-width window_degrees, or whether the Moon is at a declination extreme.
Modes
Mode options
Fires only on the bars sitting on an exact named phase, like the new or full moon.
When to use: Pick this when you want a tight gate that opens just around one specific phase.
Fires whenever the phase angle is within a band of half-width window_degrees around the chosen phase, so a few days each side count.
When to use: Use this to catch the whole window of days around a phase instead of the single exact day.
Fires when the Moon reaches a declination extreme (its furthest north or south), ignoring the named phase entirely.
When to use: Use this for lunar-standstill timing where the Moon's latitude matters more than its phase.
Phase options
Test the new moon, where the Moon sits between Earth and Sun (phase angle near zero).
When to use: Pick new to gate around the dark of the moon, a classic cycle start.
Test the waxing crescent, the thin growing sliver just after the new moon.
When to use: Pick this to gate the early-growth days between new and first quarter.
Test the first quarter, when half the Moon is lit and it is a quarter through its cycle.
When to use: Pick this to gate the rising half-moon midway between new and full.
Test the waxing gibbous, the more-than-half lit Moon still growing toward full.
When to use: Pick this to gate the swelling days just before the full moon.
Test the full moon, where the Moon is opposite the Sun and fully lit (phase angle near 180 degrees).
When to use: Pick full to gate around the brightest, most-watched phase of the cycle.
Test the waning gibbous, the more-than-half lit Moon now shrinking after the full moon.
When to use: Pick this to gate the fading days just after the full moon.
Test the last quarter, when half the Moon is lit again and it is three quarters through its cycle.
When to use: Pick this to gate the falling half-moon between full and the next new moon.
Test the waning crescent, the thin shrinking sliver in the last days before the new moon.
When to use: Pick this to gate the final dwindling days as the cycle ends.
Configuration
Choose an exact named phase (is_phase), a phase-angle window (angle_band), or a declination extreme (declination_extreme).
Which named lunar phase to test, from new through the quarters to full and back.
Half-width of the phase-angle band in degrees; only used in angle_band mode.
Connects to
Examples
- Use is_phase mode to only allow long entries around the new moon.
- Use angle_band with a 30 degree window as a filter for the days around the full moon.
Common mistakes
- Using a wide window_degrees, which keeps the gate open for most of the lunar cycle and removes its selectivity.
- Expecting the phase to predict direction rather than just mark a window of time.