PROTECTED SOURCE SCRIPT
DXY-XAUUSD Correlation with Thresholds

Indicator Description: "DXY-XAUUSD Correlation with Thresholds"
This indicator tracks the dynamic correlation between the US Dollar Index (DXY) and gold prices (XAUUSD) over a user-defined period, expressed as a percentage. It calculates the rolling correlation coefficient between the closing prices of these two assets, scaled to ±100%, and visualizes it as a histogram.
Key Features:
Adjustable correlation period (default: 30 bars) and configurable positive/negative thresholds (default: ±70%).
Color-coded histogram: Intense green/red highlights correlations exceeding thresholds, signaling strong positive/negative relationships.
Horizontal dotted lines mark threshold levels, aiding in identifying overextended "overbought" or "oversold" correlation conditions.
An info table displays the current correlation value and active thresholds for quick reference.
Designed for traders analyzing the inverse relationship between the dollar and gold, this tool helps spot periods of extreme correlation divergence or convergence. The visual alerts and customizable parameters make it adaptable to various trading strategies and timeframes.
Note: The indicator is plotted in a separate pane (non-overlay) for clarity.
This indicator tracks the dynamic correlation between the US Dollar Index (DXY) and gold prices (XAUUSD) over a user-defined period, expressed as a percentage. It calculates the rolling correlation coefficient between the closing prices of these two assets, scaled to ±100%, and visualizes it as a histogram.
Key Features:
Adjustable correlation period (default: 30 bars) and configurable positive/negative thresholds (default: ±70%).
Color-coded histogram: Intense green/red highlights correlations exceeding thresholds, signaling strong positive/negative relationships.
Horizontal dotted lines mark threshold levels, aiding in identifying overextended "overbought" or "oversold" correlation conditions.
An info table displays the current correlation value and active thresholds for quick reference.
Designed for traders analyzing the inverse relationship between the dollar and gold, this tool helps spot periods of extreme correlation divergence or convergence. The visual alerts and customizable parameters make it adaptable to various trading strategies and timeframes.
Note: The indicator is plotted in a separate pane (non-overlay) for clarity.
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。