OPEN-SOURCE SCRIPT

线-美元指数灯

465
1️⃣ 设计目的
帮助交易者快速判断当前市场风险状态,会自动匹配当前品种数据
将宏观美元走势与主币种短期趋势结合,给出 红/橙/绿三色风险提示

2️⃣ 数据来源与逻辑
宏观因素
参考美元指数(DXY)日线涨幅
作用:美元走强 → 全球风险资产承压 → 风险增加

主币种短期趋势
EMA斜率(1小时)判断趋势方向
RSI(1小时)判断超买/超卖状态

风险评分系统
每个条件满足则计1分
分数规则:
2分及以上 → 红灯(高风险,建议暂停策略)
1分 → 橙灯(中风险,小仓谨慎)
0分 → 绿灯(低风险,可正常操作)

1️⃣ Design Purpose
Helps traders quickly assess current market risk.
Combines macro dollar trends with short-term trends of the underlying currency to generate red, orange, and green risk alerts.

2️⃣ Data Source and Logic
Macro Factors
References to the daily gains of the US Dollar Index (DXY)
Impact: A stronger US dollar → pressure on global risk assets → increased risk

Short-term trends of underlying currencies
EMA slope (1-hour) determines trend direction
RSI (1-hour) determines overbought/oversold conditions

Risk Scoring System
Each condition met is assigned 1 point.
Scoring Rules:
2 points and above = Red (High risk, recommend pausing the strategy)
1 point = Orange (Medium risk, caution with small positions)
0 points = Green (Low risk, normal operation)

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.