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.
Usage
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!
Conclusion
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.
Added ability to plot RS Line in same pane as price
More aesthetic look to the indicator
Reorganized indicator inputs box
User Settings
Inputs
Now there are two sections in the Inputs tab - Basic & Advanced.
BASIC
- 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.
Added ability to add moving average to the indicator
User Settings (for Moving Average)
ADVANCED
- Checkbox : Toggle moving average on/off - Type : Change moving average type (Simple/Exponential/Weighted) - Period : Moving average calculation period/length
Hey Arpan! I really love this indicator..I have a request, can you please add nifty 50 line along with RS line.
Arpan_K
⋅
@balkrish21_, Noted, will add this in upcoming updates.
kunalin
⋅
@Arpan_K, also it would be big help if you can add values of high and current
MrDWatson
⋅
question, is there a way to save what index i want to compare to for each stock. Example.. oil stocks compared to #XLE. then if i watch to a tech stock, then it automatically has #xlk as the index to compare instead of oil for the oil stock.
Arpan_K
⋅
@MrDWatson, Hi, currently there isn't such a provision. You need to change the base symbol in order to compare with another index.
tradengreen
⋅
can u pl put rs score in text on chart
anbuthanakodi
⋅
Hi Arpan, Great Work, Is it possible to add a variable with value 0 or 1 when there is a Blue Dot, so that we can use it for Alert
MaheshVakharia
⋅
Dear Arpan , Small suggestion, kindly separate the indicator from the stock charts , in high value stock , it is just difficult to view . Just see the chart of DHANUKA AG. and your will know what my this suggestion is . Thanks for your such knowledge sharing .
Triyambak_CA
⋅
Hi Arpan.
Nice script. One request, can u plz give an option to change the color of the "RS Line" label.
REKHA_CHOUDHARY
⋅
Arpan sir excellent tool very helpful. Waiting for new update