OPEN-SOURCE SCRIPT

RRG Relative Strength

133
# RRG Relative Strength (RRG RS)

Compare any symbol to a benchmark using two RRG-style lines: **RS-Ratio** (trend of relative strength) and **RS-Momentum** (momentum of that trend). Both are centered at **100**:
- **RS-Ratio > 100** → outperforming the benchmark
- **RS-Ratio < 100** → underperforming
- **RS-Momentum** often **leads** RS-Ratio (crosses 100 earlier)

# How it works
1) Relative Strength (RS): RS = Close(symbol) / Close(benchmark)
2) Normalize around 100: smooth RS with EMA and divide RS by that EMA
3) RS-Ratio: EMA( RS / EMA(RS, Length), LenSmooth ) * 100
4) RS-Momentum: RS-Ratio / EMA(RS-Ratio, LenSmooth) * 100

# Inputs
- Length (default 14): normalization window for RS
- Length Smooth (default 20): smoothing window for RS-Ratio & RS-Momentum

# Benchmark (auto)
- US: SP:SPX (S&P 500)
- Vietnam: HOSE:VNINDEX
- Crypto: INDEX:BTCUSD
(Modify the mapping if needed, or replace with your own input.symbol().)

# How to read
- Improving: RS-Momentum crosses above 100 while RS-Ratio turns up
- Leading: RS-Ratio > 100 with RS-Momentum ≥ 100
- Weakening: RS-Momentum drops below 100; RS-Ratio often follows

# Timeframes & presets
- Works on Daily and Weekly charts
- Daily (fast): 14 / 20
- Approx. weekly behavior on Daily: 50 / 60

Note: Values usually hover near 100 (e.g., ~90–110) but are not strictly bounded. Ensure your symbol and benchmark trade in comparable sessions/currencies.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。