OPEN-SOURCE SCRIPT
线-美元指数灯

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)
帮助交易者快速判断当前市场风险状态,会自动匹配当前品种数据
将宏观美元走势与主币种短期趋势结合,给出 红/橙/绿三色风险提示
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)
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。