OPEN-SOURCE SCRIPT

BTC vs 美元指数(DXY) 强度指标

63
1. Introduction
一、 指标简介
In the grand game of macroeconomics, the relationship between Bitcoin (BTC) and the US Dollar Index (DXY) is a key barometer for market risk appetite versus risk-aversion.
在宏观经济的大棋局中,比特币(BTC)与美元指数(DXY)的强弱关系,是衡量市场风险偏好与避险情绪的核心风向标。

It is often said that "BTC is a hedge against a falling dollar." This indicator is built upon this classic logic, providing you with a quantitative and intuitive analytical tool.
交易员们常说「BTC 是抗美元下跌的工具」,本指标正是基于这一经典逻辑,为您提供一个量化、直观的分析工具。

The BTC vs. DXY Strength Index helps you gain insight into critical questions by calculating the relative performance spread between the two assets, combined with statistical tools (Bollinger Bands) and significant historical macro signals (DXY weekly death cross):
BTC vs 美元指数(DXY) 强度指标 通过计算两者的相对表现差异,并结合统计学工具(布林带)和重要的历史宏观信号(DXY周线死叉),帮助您洞察以下关键问题:

Is the current market dominated by BTC (risk-on) or the Dollar (risk-off)?

当前市场由 BTC 主导(风险偏好),还是由美元主导(避险情绪)?

Has the strength relationship between them reached an extreme level where a reversal is possible?

两者之间的强弱关系是否达到了可能逆转的极端水平?

Has a major macro reversal signal, which has historically triggered significant market shifts, appeared?

是否出现了历史上曾多次引发市场巨变的宏观反转信号?

2. Features & Interpretation
二、 核心功能与解读
2.1. Performance Spread Histogram
1. 强度差柱状图
The core of the indicator is a histogram extending from the zero line, representing the performance spread of BTC relative to DXY.
指标的核心是一系列从 0 轴延伸的柱状图,它代表了 BTC 相对于 DXY 的表现强度差。

Green Bars (Positive Value): Indicates that BTC has outperformed the DXY over the period. The taller the green bar, the stronger BTC's momentum and the higher the market's risk appetite.

绿色柱 (正值): 代表在该周期内,BTC 的表现优于美元指数。绿色柱越高,说明 BTC 越强势,市场风险偏好情绪越高。

Red Bars (Negative Value): Indicates that the DXY has outperformed BTC. The deeper the red bar, the stronger the Dollar and the more prevalent the risk-off sentiment.

红色柱 (负值): 代表在该周期内,美元指数的表现优于 BTC。红色柱越深,说明美元越强势,市场避险情绪越浓。

2.2. Bollinger Bands Extreme Signal
2. 布林带极端信号
The indicator calculates Bollinger Bands for the "performance spread" in the background. When the histogram breaks above or below the bands, an alert is triggered.
指标在后台对「强度差」计算布林带。当柱状图突破上下轨时,会触发警报。

Breakout Above Upper Band: BTC's strength relative to DXY has reached a statistical extreme, signaling caution for a potential mean reversion (e.g., a BTC pullback or DXY strengthening).

向上突破: BTC 相对于 DXY 的强势达到了统计上的极端,警惕短期关系回归(例如 BTC 回调或 DXY 走强)。

Breakdown Below Lower Band: BTC's weakness relative to DXY has reached a statistical extreme, signaling a potential opportunity for a bounce (e.g., BTC strengthening or DXY pulling back).

向下突破: BTC 相对于 DXY 的弱势达到了统计上的极端,关注潜在的反弹机会(例如 BTC 走强或 DXY 回调)。

2.3. DXY Historical Anomaly Signal
3. DXY 历史规律信号
This is the essence of this indicator. Based on research from Coindesk analysts, the "Death Cross" (50-week MA crossing below the 200-week MA) on the DXY weekly chart has often acted as a contrarian indicator—a "bear trap"—since 2009.
这是本指标的精髓所在。根据 Coindesk 分析师的研究,自 2009 年以来,美元指数(DXY)周线级别的「死亡交叉」(50周均线下穿200周均线)往往是一个反向指标,即「空头陷阱」。

Instead of preceding a bear market for the dollar, it has repeatedly marked major cyclical bottoms for the DXY.
它非但没有引发美元的熊市,反而屡次成为美元阶段性大底的标志。

Blue Background Highlight: When the indicator detects a "Death Cross" on the DXY weekly chart, the background will turn blue, and a high-priority alert will be triggered. This is designed to warn you that, based on historical patterns, the US Dollar may be about to bottom and strengthen, posing a significant potential bearish risk for BTC.

蓝色背景高亮: 当指标检测到 DXY 周线图上形成「死亡交叉」时,指标背景会变为蓝色,并触发最高优先级的警报。这旨在提醒您:根据历史规律,美元可能即将见底走强,这对 BTC 构成潜在的重大利空风险,需高度警惕!

3. Settings
三、 主要功能与设定
Customizable symbols for BTC and DXY.

可自定义 BTC 和 DXY 的交易对。

Freely adjustable periods for performance calculation and Bollinger Bands.

可自由调整表现计算周期、布林带参数。

Configurable MA periods for the DXY Death Cross detection, with the ability to toggle this signal on or off.

可配置 DXY 死亡交叉的均线周期,并自由开关此信号的显示。

Includes a comprehensive info panel and alert system.

包含功能全面的信息面板与警报系统。

Disclaimer: This indicator is a tool for supplementary macro analysis and is intended to provide a reference for market sentiment. It does not constitute any investment advice. All trading decisions should be based on your own research and risk assessment. Happy trading!
免责声明: 本指标是辅助宏观分析的工具,旨在提供市场情绪的参考,不构成任何投资建议。所有交易决策都应基于您自己的研究和风险判断。祝您交易顺利!

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。