Custom Scan Using a Corrected Relative Strength Study
Quickly find stocks that over-perform or under-perform an index. This video shows how to configure a custom scan in Thinkorswim using an improved Relative Strength study. Use recent market turning points as your start date. The scan will compare stock performance from that date forward. Easily find stocks that are trending stronger or weaker than the index. Catch stocks as they make their first transition from under-perform to over-perform. Find out where the big money is reallocating their holdings.
Markets go through cycles, and during transitions the old leaders are replaced by new ones. This scan will help you spot those stocks which are in the process of that transition. Free custom code is included. The clickable link is embedded directly in the video. Be sure to not to miss it.
Link to study file: Scan_RelativeStrengthSTUDY.ts
Would you like to learn how to master the custom scan tools on Thinkorswim?
Click here: Thinkorswim Scans Beginner to Advanced
Learn how to build custom scans without writing any code: Thinkorswim Condition Wizard
DISCLAIMER: I AM NOT A CERTIFIED FINANCIAL ADVISOR AND NOTHING IN THIS VIDEO OR TEXT IS AN ADVERTISEMENT OR RECOMMENDATION TO BUY OR SELL ANY FINANCIAL INSTRUMENT. NOR IS THIS VIDEO OR TEXT INTENDED TO INSTRUCT YOU ON HOW TO MAKE BUY OR SELL DECISIONS USING ANY OF THESE INDICATORS.
*Thinkorswim is a chart analysis platform offered by TD Ameritrade: www.tdameritrade.com
TD Ameritrade provides financial services including the trading of Stocks, Futures, Options and Forex.
Please be sure to share this page with your friends and colleagues. Leaving comments below is the best way to help make the content of this site even better.
Here is the code used to create your own custom watchlist columns as demonstrated in the video below.
Instead of inserting the date into the scan script as you detailed in your video, can’t we just set the start date through the chart settings (time frame-custom) which will become the reference point for the study?
You can do that on the chart, yes. But it is impossible to do that for the scan. Which is the only reason the start date was added. I am pretty sure I explained that early on in the video though.
Understood and thanks for getting back to me on this Pete. My apologies for sending you my other question via email, just let me know how I can include screenshots which should make my request/inquiry a bit simpler I believe.
If you need to provide screenshots the place to request assistance is in the Q&A Forum. Please check that you have set the date exactly the same for both the chart and scan and make sure both the chart and scan are set to the same exact time frame. This will only work on Daily time frame or higher. There is very little that can go wrong so the only possible reason you are not getting correct results is because your settings are not correct.
Thanks again for this response: I’ll check again to make sure before going through the QA forum.
A quick search of the Stock Scanners topic in the forum turned up this post: https://www.hahn-tech.com/ans/relative-strength-indicatorscan-odd-behavior-for-reference-dates-afterjune-92017/
Thanks again for this information. I’ll be sure to take this start date information into consideration when re-running everything later this afternoon.
I’m getting an error “exactly one plot expected” when I paste the code in and I can’t press ok.
This can only mean you missed a step. Please go back and review the video again and make sure not to skip any portions of it.
Thank you. It is very useful to consider different timeframe. Sometimes, we have situation there are multiply options with different strike price, we have a little problem to select one. Can we scan options according to the difference between strike price + option price and stock price?
That question is totally outside the context of this video. I suggest you search our Q&A Forum to see if someone has already posted a question similar to this.
Can this work on Intraday Basis? I am getting weird results if the date happens to be today and i am using 15 mins in the study scan. Please let me know if i am doing wrong. Thanks for sharing the indicator.
This was never intended to be used on any intraday time frame. I can’t imagine a case in which using an intraday time frame for relative strength would even be useful.
Pete you are a true master and your guidance is helping me to be a better trader by letting Thinkorswim do the heavy searches for me.
My question is can you use any prior date to correlate with. You used 10150428, but it is 2021 now, so can I use a date say 20200410? Also you used the SPX to intersect with the S&P 500, can you use all stocks if I am trying to find stocks that are doing better than the SPX or do you need to select with the S&P 500?
The date can be set to any date in which the stock markets were open for regular trading. You can use whatever ticker symbol you want for the “Correlation With Security”, and apply that any list of stocks you want to use. There are no rules here. Only suggestions.
Found my mistake finally, after dinner. In the SCAN tab, it sets by default to “SHOW 50 OPTIONS” and i had to change it from options to “STOCKS” in the dropdown menu. I kept looking into the code, rather than checking the items in scan tab.
Now, if only there was a way to setup the scan to point to the STUDY we created, it would be lot easier to change the parameters in SCAN editor, rather than going into the code each time, and changing the PLOT choice for each scan i want to do.
For custom chart studies, there is no way to provide user inputs for the scan parameters. That only works for the built-in scan filters.
This study brought me to your website through google search, and i am now a fan of your site. Will add it to my bookmarks.
Fantastic Video Pete. Question – how can you add a filter to look for stocks that are in 90 percentile on the relative strength as well as trending stronger than the index?
“90 percentile” implies a range of values. What you are describing then is something that looks back a specified number of bars, finds the highest and lowest value and then checks if each stock is currently in the top 10% of that range. Far more complex than we can solve in the comments section of a video.