OPEN-SOURCE SCRIPT

RSI + 2 MA

146
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.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน