OPEN-SOURCE SCRIPT
Gold Cycles

Four nested cycles. Two fibonacci grids that draw themselves. One weekly chart of gold that has been repeating the same rhythm.
Gold Cycle
A cycle and fibonacci confluence toolkit for XAU, inspired by the old Gann approach to harmonic cycle analysis, the idea that markets move through repeating time intervals as much as price patterns. I rebuilt it from scratch in Pine so every element updates on its own instead of needing to be redrawn by hand every time price moves.
What it plots
- Four nested cycle arcs anchored to a fixed calendar date and scaled to the instrument's own price range: 12, 21, 42 and 84 months, the same harmonic family Gann style cycle traders have leaned on for decades
- Two fibonacci retracement and extension grids, a major one and a minor one, both located automatically through pivot detection instead of manual dates
- A confluence marker every 84 months, plus a shorter 42 month early warning marker
- An automatic support box drawn from the recent trading range
- A declining resistance line that only appears once price has actually formed a lower high after a peak, connecting the all time high to that lower high and projecting it forward
Why it's built this way
Most cycle overlays either get lost at the bottom of a chart that has grown from a few hundred dollars to a few thousand, or blow the price scale out completely once the arcs get large enough to matter. This version scales every arc to the instrument's all time high and low, so the geometry stays readable at any zoom level. The resistance line only draws once a genuine post top lower high exists, so it will never hand you a rising line and call it declining resistance.
How I read it
No single element here is a signal on its own. I watch for stacking, a cycle marker landing within a few weeks of a fibonacci level, the support box, or the resistance line. When two or three line up on the same zone, that's where I actually pay attention to price action. One element by itself is a note, not a trade.
Backtest context
Across the weekly XAU dataset, the 127.2% extension on the major fibonacci grid reversed price around 70% of the time it was tested, the strongest level in the set. Deep extensions past 161.8% were far less reliable as reversal zones and behaved more like exhaustion targets than turning points. Sample sizes get thin at the outer levels, so treat those numbers as a tendency rather than a rule.
Inputs
- Anchor date and all four cycle periods, fully adjustable
- Auto or manual mode for Fib A, Fib B, the support box, and the resistance line, each with its own toggle
- Pivot lookback length for the major and minor fibonacci grids
- Full color group for every element on the chart
A taste of the code
The harmonic periods sit right at the top of the script, nothing hidden or hardcoded deep in the logic.
This publishes as an overlay study. It is a cycle and confluence mapping tool, not financial advice, and gold's real history only covers a couple of full major cycles, so treat every statistic here as a description of the past rather than a promise about the future.
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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 PulseWire. Read more in the Terms of Use.
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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 PulseWire. Read more in the Terms of Use.
