OPEN-SOURCE SCRIPT

GoldAlgo DXY

183
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.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.