OPEN-SOURCE SCRIPT
RSI + 2 MA

This indicator displays the RSI line together with 2 moving averages (MA) calculated on the RSI value itself — not MAs on price. The goal is to observe RSI momentum over time rather than reading the raw oscillator alone, helping to filter out noise and identify momentum trends more clearly.
Calculation:
RSI is calculated based on the source and length chosen by the user (default: close, length 14).
MA 1 is applied to the RSI series (default: SMA 9) — reacts quickly to changes in RSI.
MA 2 is applied to the RSI series (default: WMA 45) — smoother, representing medium-term momentum trend.
Both MAs support 7 types: SMA, EMA, WMA, RMA, VWMA, HMA, TMA, and can be customized independently.
How to read the signals:
When the RSI line is above both MA lines → background fills green, indicating momentum is leaning bullish.
When the RSI line is below both MA lines → background fills red, indicating momentum is leaning bearish.
When RSI sits between the 2 MAs (no consensus) → background fills neutral gray.
A reference line at 50 is plotted, and can be shown/hidden.
Two built-in alertconditions are included: RSI crossing above both MAs, and RSI crossing below both MAs — for setting up automated alerts.
Cách đọc tín hiệu:
Khi đường RSI nằm trên cả 2 đường MA → nền tô xanh, thể hiện động lượng đang nghiêng về phía tăng.
Khi đường RSI nằm dưới cả 2 đường MA → nền tô đỏ, thể hiện động lượng đang nghiêng về phía giảm.
Khi RSI nằm giữa 2 MA (không đồng thuận) → nền tô xám trung tính.
Đường mốc 50 được vẽ tham chiếu, có thể ẩn/hiện.
Có 2 alertcondition dựng sẵn: RSI cắt lên trên cả 2 MA, và RSI cắt xuống dưới cả 2 MA — dùng để thiết lập cảnh báo tự động.
Calculation:
RSI is calculated based on the source and length chosen by the user (default: close, length 14).
MA 1 is applied to the RSI series (default: SMA 9) — reacts quickly to changes in RSI.
MA 2 is applied to the RSI series (default: WMA 45) — smoother, representing medium-term momentum trend.
Both MAs support 7 types: SMA, EMA, WMA, RMA, VWMA, HMA, TMA, and can be customized independently.
How to read the signals:
When the RSI line is above both MA lines → background fills green, indicating momentum is leaning bullish.
When the RSI line is below both MA lines → background fills red, indicating momentum is leaning bearish.
When RSI sits between the 2 MAs (no consensus) → background fills neutral gray.
A reference line at 50 is plotted, and can be shown/hidden.
Two built-in alertconditions are included: RSI crossing above both MAs, and RSI crossing below both MAs — for setting up automated alerts.
Cách đọc tín hiệu:
Khi đường RSI nằm trên cả 2 đường MA → nền tô xanh, thể hiện động lượng đang nghiêng về phía tăng.
Khi đường RSI nằm dưới cả 2 đường MA → nền tô đỏ, thể hiện động lượng đang nghiêng về phía giảm.
Khi RSI nằm giữa 2 MA (không đồng thuận) → nền tô xám trung tính.
Đường mốc 50 được vẽ tham chiếu, có thể ẩn/hiện.
Có 2 alertcondition dựng sẵn: RSI cắt lên trên cả 2 MA, và RSI cắt xuống dưới cả 2 MA — dùng để thiết lập cảnh báo tự động.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。