Relative Strength Line by @iArpanK

Hello Traders!

I'm a Momentum Trader, following the Indian & US markets. Most of us are familiar with the Relative Strength ( RS ) indicator, popularized by Investor's Business Daily (IBD) and available on their MarketSmith platform. So, here I'm sharing a script that does the same and additionally pops an alert label when the RS line hits a new high (similar to Blue Dot appearance on MarketSmith charts).

User Settings

Inputs tab

  • Base Symbol : Symbol of the security/index with which you want to compare your current active symbol.
  • Period : Number of days since which you want to scan for a new high (default is 250 days, which approximately pops alerts for new 52 week high in RS ). For example, if you want to look for new 10 days high in RS , set the Period to 10.

Style tab

  • RS Line : Change color using the palette provided (default is blue).
  • Alert Label : Show/hide alert labels by checking/unchecking the box. Change color using the palette provided. Change alert label symbol.
  • Precision : Default is two decimal places. Can be changed as per requirement.


The indicator consists of two components- the Relative Strength ( RS ) line & alert labels on new RS highs. Relative strength gives a measure of how the underlying security is performing with respect to a base index or security. For example, how is NSE:DIXON performing w.r.t NSE:NIFTY or how is NASDAQ:AAPL performing w.r.t. the TVC:SPX .

A rising RS line tells us that the underlying entity is outperforming the base entity. Similarly, a declining RS line shows under-performance of the underlying entity. A new high in RS (especially before a new high in price) often gives valuable information about the underlying security's strength w.r.t. the general market, and can tip us off to a possible breakout in the price in near future.

Making RS lists (list of stocks making new high in RS on heavy down days in index) can be very helpful to sort out leaders that are best resisting the decline and are likely to move up aggressively when the market turns favorable.

The concept of RS is extensively used by momentum traders and growth stock traders. When used in conjunction with price & volume action, this can be a very powerful tool in your trading arsenal. You can now easily spot RS trends and new highs visually by simply adding this indicator to your chart!


If you like this script, click on Add to favorite indicators, so that you can easily add this indicator from your favorites tab right away.

You can reach me on twitter @iArpanK where I share my ideas & psychology tips.

Release Notes: Relative Strength Line by @iArpanK v1.1

New features in version 1.1

  • Alert label for RS New High before Price
  • Alert label for RS New Low
  • Multi-colored RS Line

User Settings

Inputs tab

  • Added ability to change RS Line Up/Down color

Style tab

  • Added ability to show/hide, change colors/shapes of the different alert labels
Release Notes: Relative Strength Line by @iArpanK v1.2

New features in version 1.2

  • Added ability to plot RS Line in same pane as price
  • More aesthetic look to the indicator
  • Reorganized indicator inputs box

User Settings


Now there are two sections in the Inputs tab - Basic & Advanced.


- Base Symbol : Symbol of the security/index with which you want to compare your current active symbol
- New High Period : Lookback period for new highs in RS (default is 250)
- RS Line Width : Thickness of RS Line
- RS Line Color : Color for Growing/Falling RS Line

ADVANCED (Only for overlay RS)

- Scaling Factor : Number to adjust RS scale for plotting it on Price pane (default is 7)

How to choose appropriate Scaling Factor?

Divide the value of the base symbol you're using by 2000. Your Scaling Factor should be approximately around that value.
For example, if you're using TVC:SPX as base symbol, the index quotes around 4000 as of now. So, Scaling Factor would be around 4000/2000 = 2.

Some Scaling Factors as of now for reference:

Release Notes: Relative Strength Line by @iArpanK v1.3

New features in version 1.3
  • Added ability to add moving average to the indicator

User Settings (for Moving Average)


- Checkbox : Toggle moving average on/off
- Type : Change moving average type (Simple/Exponential/Weighted)
- Period : Moving average calculation period/length

Protected script
This script is published closed-source and you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?