OPEN-SOURCE SCRIPT
GoldAlgo DXY

GoldAlgo DXY puts the US Dollar Index in a panel under your Gold (XAUUSD) chart and translates it into one simple question: is the dollar a headwind or a tailwind for gold right now?
WHY THE DOLLAR
Gold is priced in dollars, so most of the time it trades inverse to the Dollar Index: a rising DXY pressures gold down, a falling DXY supports it. Watching the two side by side is one of the oldest edges in gold trading — this tool does it for you and reads the relationship out loud.
HOW IT WORKS
1. The dollar in a panel. DXY is plotted as candles (or a line) on your chart's own timeframe, with a trend EMA (default 50) over it.
2. The bias tint. The panel background shades softly red while the dollar trends above its EMA (headwind for gold) and softly green while it trends below (tailwind), so the bias is readable at a glance without studying the candles.
3. The correlation check. A rolling correlation between gold and DXY is tracked over a configurable lookback. On gold it normally sits deep negative; when it drifts toward zero the panel flags the relationship as broken — on those days, trust the dollar less.
ON-CHART DASHBOARD
A live panel shows the DXY price, today's percentage change, the dollar trend, the current gold/DXY correlation with a broken-relationship flag, and the resulting gold bias in plain words: headwind or tailwind.
ALERTS
Alert conditions for the dollar turning up (crossing above its EMA) and turning down (crossing below), so you catch the shifts in the gold backdrop from your phone.
SETTINGS
Dollar Index symbol, candles or line, trend EMA length, correlation lookback, bias tint on/off, and full color customization.
IMPORTANT
GoldAlgo DXY works only on Gold (XAUUSD). On any other symbol it displays a notice instead of drawings. This is an educational analysis tool: correlation is a tendency, not a rule — it does not predict the market and it is not financial advice. Always use proper risk management and never risk capital you cannot afford to lose.
WHY THE DOLLAR
Gold is priced in dollars, so most of the time it trades inverse to the Dollar Index: a rising DXY pressures gold down, a falling DXY supports it. Watching the two side by side is one of the oldest edges in gold trading — this tool does it for you and reads the relationship out loud.
HOW IT WORKS
1. The dollar in a panel. DXY is plotted as candles (or a line) on your chart's own timeframe, with a trend EMA (default 50) over it.
2. The bias tint. The panel background shades softly red while the dollar trends above its EMA (headwind for gold) and softly green while it trends below (tailwind), so the bias is readable at a glance without studying the candles.
3. The correlation check. A rolling correlation between gold and DXY is tracked over a configurable lookback. On gold it normally sits deep negative; when it drifts toward zero the panel flags the relationship as broken — on those days, trust the dollar less.
ON-CHART DASHBOARD
A live panel shows the DXY price, today's percentage change, the dollar trend, the current gold/DXY correlation with a broken-relationship flag, and the resulting gold bias in plain words: headwind or tailwind.
ALERTS
Alert conditions for the dollar turning up (crossing above its EMA) and turning down (crossing below), so you catch the shifts in the gold backdrop from your phone.
SETTINGS
Dollar Index symbol, candles or line, trend EMA length, correlation lookback, bias tint on/off, and full color customization.
IMPORTANT
GoldAlgo DXY works only on Gold (XAUUSD). On any other symbol it displays a notice instead of drawings. This is an educational analysis tool: correlation is a tendency, not a rule — it does not predict the market and it is not financial advice. Always use proper risk management and never risk capital you cannot afford to lose.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.