Relative Strength and Momentum
Sep 10, 2024

The Relative Strength and Momentum indicator is a multi-asset analysis tool designed to help traders identify the strongest symbols and sectors by comparing their performance against a benchmark index. It processes up to 20 different assets simultaneously, presenting their relative strength and momentum rankings in a clear, color-coded table format to streamline market analysis.
Usage
The tool is primarily used for sector rotation analysis and stock selection. By monitoring the tables, users can identify assets that are consistently outperforming a benchmark (like the S&P 500 or Nifty 50).
- Relative Strength Rank Table: Displays the percentile rank (1-100) of each symbol's performance relative to the group. Higher numbers indicate top-tier performers.
- Momentum Table: Displays the Relative Strength Index (RSI) of the relative strength line itself, highlighting the rate of change in outperformance.
- Color Logic:
- Aqua: Indicates the symbol is excelling in both relative strength and momentum (ideal for trend following).
- Green: Indicates stable or improving performance in that specific metric.
- Red: Indicates declining relative strength or weakening momentum.
Details
The script executes several layers of calculation to determine its rankings:
- Relative Strength (RS): Calculated as the ratio between the symbol price and the benchmark price, smoothed with an Exponential Moving Average (EMA).
- Momentum: Derived from a multi-timeframe RSI approach and price proximity to a 9-period EMA.
- Percentile Ranking: The RS Rating is calculated using weighted gains over four different lookback segments (40% for the most recent, 20% for each of the three preceding segments). These ratings are then ranked against all other symbols in the list to produce a percentile score.
Settings
Symbols
- Symbol A-T: Define the 20 symbols you wish to monitor.
- Benchmark Symbol: The base index used for relative strength calculations.
Length
- Lookback Period: The number of bars used to compute the Relative Strength and Momentum metrics.
- Total Bars: Determines how many historical columns of data are displayed in the tables.
Table Options
- Size: Adjusts the visual scale of the tables on the chart.
- Enable Dark Theme: Switches between light and dark UI modes for better visibility depending on your chart theme.
FAQ
How do I access Relative Strength and Momentum?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Can I change the benchmark index?
Yes, the benchmark can be changed in the settings to any symbol, such as SPY for US equities, BTC for crypto markets, or a specific sector ETF.
What does a high RS Rank mean?
A rank near 100 means that symbol is currently outperforming almost all other symbols in your selected list based on the weighted lookback period.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.