OPEN-SOURCE SCRIPT

Relative Strength and Momentum

업데이트됨
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.
릴리즈 노트
Avoid displaying ticker information for the benchmark index.
릴리즈 노트

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

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?

면책사항