OPEN-SOURCE SCRIPT

Relative Strength and Momentum

Aktualisiert
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.
Versionshinweise
Avoid displaying ticker information for the benchmark index.
Versionshinweise

  • The script now supports all time periods.
  • Removed specific references to "Week" as the script has been updated to work across all time frames.
Versionshinweise
Bug Fix.
Versionshinweise
Updated the code to display RS and Momentum data for 20 symbols, an increase from the previous limit of 15.
Versionshinweise
Bug Fix.
Versionshinweise
Bug Fix.
Versionshinweise
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.
Versionshinweise
Fixed the RS Rating Computation
Versionshinweise
Improved momentum calculations
indexanalysisMomentum Indicator (MOM)momentumindicatormomentumtradingrelativestrengthRelative Strength Comparisonsector_analysissectorrotationstrengthandweaknessswingtradingTrend Analysis

Open-source Skript

Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun das Script auch andere Trader verstehen und prüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?

Haftungsausschluss