OPEN-SOURCE SCRIPT
EMA with RSI Color (Custom Lengths)

本指标将指数移动平均线(EMA)与相对强弱指标(RSI)相结合,用于辅助判断市场的趋势方向与超买 / 超卖状态。
用户可自定义 EMA 的长度(如 20 / 60 / 120),并灵活选择 EMA 的计算周期:
(1) 使用当前图表周期,或
(2) 使用指定的高 / 低周期(如 1m、5m、1h、4h、1D、1W)
RSI 默认采用 14 周期,并支持自定义超买与超卖阈值:
(1) 当 RSI 低于超卖阈值(如 30)时,对应时间段内的 EMA 将自动变为绿色,提示可能存在超卖反弹机会;
(2) 当 RSI 高于超买阈值(如 70)时,对应时间段内的 EMA 将自动变为红色,提示可能存在超买回调风险;
(3) 当 RSI 处于中性区间时,EMA 显示为用户设定的默认颜色。
此外,RSI 的计算周期也可选择:
(1) 与 EMA 使用相同的周期(用于多周期趋势确认),或
(2) 使用当前图表周期(用于短周期动量判断)。
This indicator combines Exponential Moving Averages (EMA) with the Relative Strength Index (RSI) to assist in identifying trend direction and overbought/oversold conditions.
Users can define custom EMA lengths (e.g., 20 / 60 / 120) and flexibly choose the EMA calculation timeframe:
(1) Use the current chart timeframe, or
(2) Use a specified higher or lower timeframe (e.g., 1m, 5m, 1h, 4h, 1D, 1W).
The RSI uses a default 14-period setting, with customizable overbought and oversold levels:
(1) When RSI falls below the oversold threshold (e.g., 30), the EMA segments corresponding to that period are automatically colored green, indicating potential oversold rebound opportunities;
(2) When RSI rises above the overbought threshold (e.g., 70), the EMA segments turn red, signaling potential overbought pullback risk;
(3) When RSI remains within the neutral zone, EMA lines retain their user-defined default colors.
The RSI calculation timeframe can also be selected:
(1) The same timeframe as EMA (for multi-timeframe trend confirmation), or
(2) The current chart timeframe (for short-term momentum analysis).
用户可自定义 EMA 的长度(如 20 / 60 / 120),并灵活选择 EMA 的计算周期:
(1) 使用当前图表周期,或
(2) 使用指定的高 / 低周期(如 1m、5m、1h、4h、1D、1W)
RSI 默认采用 14 周期,并支持自定义超买与超卖阈值:
(1) 当 RSI 低于超卖阈值(如 30)时,对应时间段内的 EMA 将自动变为绿色,提示可能存在超卖反弹机会;
(2) 当 RSI 高于超买阈值(如 70)时,对应时间段内的 EMA 将自动变为红色,提示可能存在超买回调风险;
(3) 当 RSI 处于中性区间时,EMA 显示为用户设定的默认颜色。
此外,RSI 的计算周期也可选择:
(1) 与 EMA 使用相同的周期(用于多周期趋势确认),或
(2) 使用当前图表周期(用于短周期动量判断)。
This indicator combines Exponential Moving Averages (EMA) with the Relative Strength Index (RSI) to assist in identifying trend direction and overbought/oversold conditions.
Users can define custom EMA lengths (e.g., 20 / 60 / 120) and flexibly choose the EMA calculation timeframe:
(1) Use the current chart timeframe, or
(2) Use a specified higher or lower timeframe (e.g., 1m, 5m, 1h, 4h, 1D, 1W).
The RSI uses a default 14-period setting, with customizable overbought and oversold levels:
(1) When RSI falls below the oversold threshold (e.g., 30), the EMA segments corresponding to that period are automatically colored green, indicating potential oversold rebound opportunities;
(2) When RSI rises above the overbought threshold (e.g., 70), the EMA segments turn red, signaling potential overbought pullback risk;
(3) When RSI remains within the neutral zone, EMA lines retain their user-defined default colors.
The RSI calculation timeframe can also be selected:
(1) The same timeframe as EMA (for multi-timeframe trend confirmation), or
(2) The current chart timeframe (for short-term momentum analysis).
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。