OPEN-SOURCE SCRIPT
Zaktualizowano Mansfield RS+ - Relative Strength with Price Confirmation

Combines the Mansfield Relative Strength calculation (credit: stageanalysis) with a price action confirmation overlay (credit: bharatTrader) into a single indicator.
Calculation
The RS line measures daily stock price divided by weekly SPX close, normalized against a 52-week SMA of that ratio. Values above zero indicate outperformance vs. the S&P 500. Values below zero indicate underperformance.
Inputs
Reading the indicator
The zero line changes color based on RS momentum direction — green when RS is accelerating, red when decelerating.
Bubbles appear when price and its 50 SMA agree on direction. Green bubbles indicate price above a rising SMA. Red bubbles indicate price below a falling SMA.
RS above zero with green bubbles: RS and price both confirm, strongest long signal. RS above zero with red bubbles: RS positive but price weakening, use as a caution signal. RS below zero with green bubbles: price leading RS, early watch but not yet actionable. RS below zero with red bubbles: both confirm weakness, avoid.
Alerts included
Credits:
Mansfield RS formula: [url=
Price confirmation bubble logic: bharatTrader
Calculation
The RS line measures daily stock price divided by weekly SPX close, normalized against a 52-week SMA of that ratio. Values above zero indicate outperformance vs. the S&P 500. Values below zero indicate underperformance.
Inputs
- Symbol: benchmark index (default SP:SPX)
- MA Length: lookback period for the zero line SMA (default 52)
- Price Confirmation Period: SMA length for bubble logic (default 50)
- RS Trend Range: lookback for zero line momentum color (default 5)
- Show Bubbles: toggle price confirmation overlay
- Show Background Colors: toggle Mansfield-style background
Reading the indicator
The zero line changes color based on RS momentum direction — green when RS is accelerating, red when decelerating.
Bubbles appear when price and its 50 SMA agree on direction. Green bubbles indicate price above a rising SMA. Red bubbles indicate price below a falling SMA.
RS above zero with green bubbles: RS and price both confirm, strongest long signal. RS above zero with red bubbles: RS positive but price weakening, use as a caution signal. RS below zero with green bubbles: price leading RS, early watch but not yet actionable. RS below zero with red bubbles: both confirm weakness, avoid.
Alerts included
- RS crossed above/below zero
- RS trend turned bullish/bearish
Credits:
Mansfield RS formula: [url=

Price confirmation bubble logic: bharatTrader
Informacje o Wersji
Added configurable value label size and color override option. Reduced bubble size. Removed unused background color inputs.Informacje o Wersji
Bug fix to make it work on smaller time frames.Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.