OPEN-SOURCE SCRIPT
Obsidians Gold Revenge

Many traders (including institutional desks) track lunar cycles on Gold (XAUUSD) because of the psychological impact on market sentiment. The common theory—often attributed to methods like Gann analysis—is:
🌑 New Moon: Often correlates with Market Bottoms (Buy Signals) or "New Beginnings."
🌕 Full Moon: Often correlates with Market Tops (Sell Signals) or "Exhaustion."
Here is a script that mathematically calculates the Moon Phase based on the lunar synodic month (approx. 29.53 days). It will plot these events on your chart so you can visually backtest if Gold respects these cycles.
How to use this for testing
Add it to your Chart: Apply it to the XAUUSD (Gold) chart.
Timeframe: This works best on 4-Hour (4H) or Daily (1D) charts. (On 15m charts, the moon phase covers many candles, so the label will appear on the specific candle where the phase officially "switched").
What to look for:
Look at the Dark Blue (New Moon) areas. Did price form a bottom or start a rally there?
Look at the Yellow (Full Moon) areas. Did price peak and reverse downward there?
Note: Lunar cycles are considered a "timing tool" rather than a directional indicator. They often indicate when a reversal might happen, but you should combine this with your Institutional Candle zones to confirm the direction!
🌑 New Moon: Often correlates with Market Bottoms (Buy Signals) or "New Beginnings."
🌕 Full Moon: Often correlates with Market Tops (Sell Signals) or "Exhaustion."
Here is a script that mathematically calculates the Moon Phase based on the lunar synodic month (approx. 29.53 days). It will plot these events on your chart so you can visually backtest if Gold respects these cycles.
How to use this for testing
Add it to your Chart: Apply it to the XAUUSD (Gold) chart.
Timeframe: This works best on 4-Hour (4H) or Daily (1D) charts. (On 15m charts, the moon phase covers many candles, so the label will appear on the specific candle where the phase officially "switched").
What to look for:
Look at the Dark Blue (New Moon) areas. Did price form a bottom or start a rally there?
Look at the Yellow (Full Moon) areas. Did price peak and reverse downward there?
Note: Lunar cycles are considered a "timing tool" rather than a directional indicator. They often indicate when a reversal might happen, but you should combine this with your Institutional Candle zones to confirm the direction!
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.