OPEN-SOURCE SCRIPT

Relative Strength and Momentum

Actualizado
Relative Strength and Momentum Indicator

Unlock deeper market insights with the Relative Strength and Momentum Indicator—a powerful tool designed to help traders and investors identify the strongest stocks and sectors based on relative performance. This custom indicator displays essential information on relative strength and momentum for up to 15 different symbols, compared against a benchmark index, all within a clear and organized table format.

Key Features:

1. Customizable Inputs: Choose up to 15 symbols to compare, along with a benchmark index, allowing you to tailor the indicator to your trading strategy. The 'Lookback Period' input defines how many weeks of data are analyzed for relative strength and momentum.

2. Relative Strength Calculation: For each selected symbol, the indicator calculates the Relative Strength (RS) against the chosen benchmark. This RS is further refined using an exponential moving average (EMA) to smooth the results, providing a more stable trend overview.

3. Momentum Analysis: Momentum is determined by analyzing the rate of change in relative strength. The indicator calculates a momentum rank for each symbol, based on its relative strength’s improvement or deterioration.

4. Percentile Ranking System: Each symbol is assigned a percentile rank (from 1 to 100) based on its relative strength compared to the others. Similarly, momentum rankings are also assigned from 1 to 100, offering a clear understanding of which assets are outperforming or underperforming.

5. Visual Indicators:
a. Green: Signals improving or stable relative strength and momentum.
b. Red: Indicates declining relative strength or momentum.
c. Aqua: Highlights symbols performing well on both relative strength and momentum—ideal candidates for further analysis.

6. Two Clear Tables:
a. Relative Strength Rank Table: Displays weekly rankings of relative strength for each symbol.

b. Momentum Table: Shows momentum trends, helping you identify which symbols are gaining or losing strength.

7. Color-Coded for Easy Analysis: The tables are color-coded to make analysis quick and straightforward. A green color means the symbol is performing well in terms of relative strength or momentum, while red indicates weaker performance. Aqua marks symbols that are excelling in both areas.

Use Case:
a. Sector Comparison: Identify which sectors or indexes are showing both relative strength and momentum to pick high-potential stocks. This allows you to align with broader market trends for improved trade entries.

b. Stock Selection: Quickly compare symbols within the same sector to find the stronger performers.
Notas de prensa
Avoid displaying ticker information for the benchmark index.
Notas de prensa

  • The script now supports all time periods.
  • Removed specific references to "Week" as the script has been updated to work across all time frames.
Notas de prensa
Bug Fix.
Notas de prensa
Updated the code to display RS and Momentum data for 20 symbols, an increase from the previous limit of 15.
Notas de prensa
Bug Fix.
Notas de prensa
Bug Fix.
Notas de prensa
Previously, the script assigned a percentile rank to each symbol by evaluating its performance in comparison to other symbols. This approach caused abrupt spikes in the percentile rank when a symbol performed exceptionally well for a single week, creating a misleading impression that the symbol had started outperforming consistently.

The current update uses a Weighted Moving Average (WMA) to smooth the percentile rank values. While the percentile rank is still calculated in the same way, the final rank is now smoothed using WMA. This change ensures:

  1. A single week of exceptional performance will not cause a dramatic spike in the rank.
  2. The use of WMA gives more weight to recent performance, meaning if a symbol continues to outperform over consecutive bars, it will still quickly achieve an improved ranking.
Notas de prensa
Fixed the RS Rating Computation
Notas de prensa
Improved momentum calculations
indexanalysisMomentum Indicator (MOM)momentumindicatormomentumtradingrelativestrengthRelative Strength Comparisonsector_analysissectorrotationstrengthandweaknessswingtradingTrend Analysis

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?

Exención de responsabilidad