StockFetcher Forums · Filter Exchange · Comparative Relative Strength (not RSI)<< 1 2 >>Post Follow-up
597 posts
msg #157737
Ignore glgene
10/2/2021 1:11:27 PM

I have seen the few scripts provided by SF on Relative Strength (NOT RSI), but I’m looking for a modification that would compare to the way IBD shows the result. For example, if MSFT relative strength is 96 (in IBD), how would I program that into SF? I “believe” IBD does a 1-year look back of a stock’s ROC performance compared to SPY to calculate it (say, the 96 with MSFT). Thus, I think an ROC(252) would be the correct number to use for 1 year of trading days. I would like a column to show the Relative Strength number (say, 96) and include the Relative Strength graph line. Any help would be appreciated. Thank you SO MUCH.

1,374 posts
msg #157744
Ignore Cheese
10/2/2021 4:24:07 PM
glgene 10/2/2021 1:11:27 PM

@ glgene

Back in 2007, danglin offered to show some of the stuff that you are looking for.

I only come across this offer today and did not contact danglin.

If danglin shares it with you, then please tell us how danglin does it.


242 posts
msg #157745
Ignore styliten
10/2/2021 5:03:01 PM

@ glgene

Fetcher[dow 30

set{spy_1Y, ind(SPY, ROC(252))}
set{roc1Y, roc(252)}
set{roc_1Y, roc1Y multiply by 100}
set{roc_rs, roc_1Y divided by spy_1Y}

draw roc1Y line at spy_1Y

add column spy_1Y
add column roc1Y
add column roc_rs

sort on column 6 desc

You can replace "draw roc1Y line at spy_1Y" with "draw clri(roc1Y, 9) line at spy_1Y" to smooth out ROC1Y line so as to get rid of the unnecessary zigzags.

154 posts
msg #157748
Ignore redversa721
10/2/2021 6:14:47 PM

wow simple and elegant. awesome!!

597 posts
msg #157753
Ignore glgene
10/2/2021 9:35:47 PM

Styl —- Wow, that was fast turnaround time! Thank you. Now I’ll do the task of comparing your SF “Relative Strength” numbers with IBD … to see if they’re in sync. I’ll get back to you real soon.

242 posts
msg #157755
Ignore styliten
10/3/2021 8:00:03 AM

@ Glgene

You can also add an extra line for a subchart which might give you some indication of timing for entries and exits:

draw cema(clri(roc1Y minus spy_1Y, 9), 13)

597 posts
msg #157759
Ignore glgene
10/3/2021 2:25:48 PM

Styl -- Well, I guess my project is not as straightforward as I would hope in SF. According to IBD:

"The proprietary RS rating measures the price performance of a given stock against the rest of the market for the past 52 weeks. Every stock in the market is assigned a rating from 1 to 99, with 99 being the best. An RS rating of 99 means the stock has outperformed 99% of all other companies in terms of price performance. A RS of 50 means that half of all other stocks have done better and half have done worse."

These two (2) Dow 30 stocks (EOD 10/1) have the following Relative Strength (RS) ratings in IBD:

GS ---- Goldman Sachs, RS = 87.
MFT -- Microsoft, RS = 79.

I don't have a clue how to script this into SF. I initially thought that if you took the ROC(252) of a stock vs the SPY ROC(252), it would point us in the right direction. But notice in the IBD definition, it says "proprietary RS" rating. ??

-- GLGene

242 posts
msg #157760
Ignore styliten
10/3/2021 7:11:36 PM

@ glgene

That's basically a percentile ranking, whereas the method in SF gives you the raw score without the percentile grouping. If you sort the raw score from high to low, you should see those same stocks at the very top corresponding to IBD score of 90 or above.

For example, if you run the actual SF script on DOW 30 stocks alone, GS is at the very top, ahead of MSFT. But if you run the SF against all S&P 500, there might be a few others that have outperformed GS in the most recent 252 days. But again, if a particular stock has one of the highest IBD scores at this very moment, people who had been riding high with this stock for a while will naturally take the very next exit to cash in and pocket the profits. So IBD score by its nature is highly fluid and dynamic. Chasing high IBD score at any given moment may or may not get the results you want.

The following script should give some visual clues on how any of the DOW 30 stocks is performing against S&P 500 EFT in the most recent 32 days (1/8 of a trading year), most recent quarter, half year and 1 year. For many people the second one (quarterly performance) is probably the better overall time frame.

Fetcher[dow 30

set{spy_1P, ind(SPY, ROC(32))}
set{spy_1Q, ind(SPY, ROC(63))}
set{spy_1H, ind(SPY, ROC(126))}
set{spy_1Y, ind(SPY, ROC(252))}

add column spy_1P
add column roc(32)
add column spy_1Q
add column roc(63)
add column spy_1H
add column roc(126)
add column spy_1Y
add column roc(252)

draw cema(clri(roc(32) minus spy_1P, 9), 13)
draw cema(clri(roc(63) minus spy_1Q, 9), 13)
draw cema(clri(roc(126) minus spy_1H, 9), 13)
draw cema(clri(roc(252) minus spy_1Y, 9), 13)

sort on column 12 desc

955 posts
msg #157789
Ignore nibor100
10/6/2021 1:19:06 PM


Here are some more IBD RS tidbits:

currently there are 9,144 stocks being followed by IBD, and a lot more than that by SF
It looks like IBD uses rounding so the RS numbers end up being integers

the following are a couple quotes from IBD website:

"Once a stock has broken out from a proper base and is trading inside the key 5% buy zone, investors should immediately check to see if the stock shows an RS Ratings of 85 or higher alongside an RS line that's nearing or making new highs. If both these criteria are met, you can be sure the stock has a higher chance of successfully breaking out to new highs."

Using The RS Rating To Analyze Stocks

"Often, investors fear high RS Ratings because they think it indicates the stock is overextended and due for a pullback. But in reality, many stocks show RS Ratings above 80 while they are still recovering and trying to make new highs. In fact, studies of winning stocks show the average RS Rating for stocks at their breakouts is around 87."

Ed S.


242 posts
msg #157790
Ignore styliten
10/6/2021 1:33:52 PM

Just curious, what's IBD's RS score on VIRT as of today/right now?


StockFetcher Forums · Filter Exchange · Comparative Relative Strength (not RSI)<< 1 2 >>Post Follow-up

*** Disclaimer *** does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. does not recommend particular securities., Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.

Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.