This indicator calculates the relative strength of a chart symbol relative to a benchmark index and plots the resulting line directly over the price chart.
1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
76 lines of Pine Script v4 from RS Line by @iArpanK.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Relative Strength Line by @iArpanK highlights new relative strength highs, new lows, and instances where relative strength reaches a new high before the price does. Users can configure the benchmark symbol, the lookback period for new highs, line appearance, an optional moving average overlay, and a scaling factor. Because it overlays on the main price chart, manual scale adjustment is required to align values properly.
Relative strength calculation against a benchmark symbol
Visual indicators for new period highs and lows
Detection of relative strength new highs preceding price new highs
Optional moving average smoothing with multiple calculation types
Configurable scaling factor and dynamic line coloring
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Base Symbol
symbol
NIFTY
index
New High Period
int
250
highPeriod
RS Line Width
int
3
line_width
RS Line Color Growing
color
color.blue
upColor
⠀Falling
color
color.fuchsia
downColor
Scaling Factor
float
7
sc_factor
Moving Average
bool
false
plotMA
typeMA
string
Simple
typeMA
periodMA
int
10
periodMA
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This indicator plots Donchian Channels alongside fast and slow simple moving averages directly on the price chart. It generates bullish breakout signals when the high reaches the upper channel while the close is above the 50 SMA (and optionally the 200 SMA). B
This indicator classifies market trends into structured stages based on moving average alignments, compression, and ATR distance from the 50-period SMA. It tracks multiple exponential moving averages against the 50 SMA to detect basing phases, breakouts, trend
This technical indicator combines SuperTrend signals, moving average trend clouds, pivot points, and daily range breakout targets directly on the price chart. It generates Buy, Strong Buy, Sell, and Strong Sell labels when price crosses the SuperTrend level in
Calculates short and long Exponential Moving Averages alongside pivot high and low levels to identify breakout signals. The indicator plots a 20 EMA and a 50 EMA on the main price chart. It evaluates trend direction based on EMA crossover alignment, checks for
CSW Breakout Signals plots breakout buy and sell labels on the price chart when price breaks support or resistance after a trend change. Each signal can show a numbered confirmation score built from a moving-average cross, momentum, opening-range alignment, re
This overlay indicator generates trading signals by combining a selected leading indicator with multiple customizable confirmation filters. Traders can toggle trend filters such as single, double, or triple moving averages, Range Filter, SuperTrend, Half Trend