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:

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.
Want to use this script on a chart?


this is really awesome work by you ... one more feed back i have to share that look like same market smith is that when price is around 1000 scalling factor auto set by some particular value...
again tell you you are doing excellent work .... which volume indicator you plot?
Arpan_K hirenpatel5205
@hirenpatel5205, Thanks for the feedback! I'm using the same TradingView's default volume indicator, only the appearance is a little modified as per my requirements.
how to find rs value ? IBD scores it like 70,99 etc
Arpan_K mathewnoman
@mathewnoman, Well, RS Rating requires ranking all stocks based on their performance. E.g. 99 RS Rating means a stock is outperforming 99% of the other stocks. But, here in TradingView, we don't have the provision to reference/rank all the stocks in the market. So, you'd have to check the rating on IBD's site itself.
Thanks for sharing, Please create scanner.
Arpan_K vinay10_10
@vinay10_10, Sure, but TradingView probably doesn't have the feature of coding a custom screener. I can create an AFL (for Amibroker) or Python script, if that helps?
@Arpan_K, please share Python script. 🙏
+1 Reply
Arpan_K vijendrakarkala
@vijendrakarkala, Ok sure, I'll see to it.
@Arpan_K, Sure. Tnank you 🙏
why are u comparing with NIFTY 250, Instead with NIFTY 50 good marketcap stocks?
Home Stock Screener Forex Screener Crypto Screener Economic Calendar About Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Private Messages Chat Sign Out