Relative Strength Vs Index + MA + RS New Highs (r6)This indicator plots a Relative Strength (RS) line that measures how a security is performing relative to a chosen benchmark index (e.g. S&P 500, FTSE 100). It is designed to help identify leaders, laggards, and early trend changes by focusing on relative performance rather than price alone.
This indicator is displayed in its own pane, keeping it visually clean and independent of price action.
What this indicator is for (and what it isn’t)
Designed for:
Relative performance analysis
Trend confirmation and leadership detection
Medium- to long-term investors and position traders
Not designed for:
Intraday trading
Entry timing on its own (best used alongside price, volume, and structure)
What the indicator does:
Calculates Relative Strength as the ratio of price to a benchmark index
Optionally normalises RS around 100 (Mansfield-style) for easy visual comparison
Plots a moving average of RS to define RS trend / phase
Colours RS green when above its moving average and red when below
Marks RS New Highs with blue dots (and optional New Lows with red dots)
Restricts New High / Low signals to Daily, Weekly, and Monthly charts only (no intraday noise)
This makes it especially useful for identifying:
Stocks outperforming the market
RS leadership before major price advances
RS turning points that often precede price trends
RS New Highs (Key feature)
Blue dots (configurable) appear when the RS line makes a new lookback high, meaning the stock is outperforming its benchmark more strongly than at any point in the selected period.
Default behaviour:
Daily charts : 252 bars (~52 weeks)
Weekly charts : 52 bars (52 weeks)
Monthly charts : 12 bars (12 months)
These RS New Highs are commonly associated with institutional accumulation and can occur before price makes a new high , providing an early signal.
What is configurable
All key elements are user-configurable via the settings panel:
Benchmark
Select any index or symbol as the RS benchmark
RS Calculatio n
Raw RS ratio
SMA-normalised RS (centred around ~100)
Moving Average
MA type: EMA, SMA, RMA, or WMA
MA length (e.g. EMA 21 on Daily, EMA 10 on Weekly)
RS New High / Low Dots
Enable / disable RS New High dots
Enable / disable RS New Low dots
Adjust lookback length separately for Daily, Weekly, and Monthly charts
Select dot size (Tiny → Large)
Alerts
RS crossing above or below its moving average
RS making a new lookback high
Pine Script® 인디케이터






















