Thinkorswim Scan Relative Strength 64

Custom Scan Using a Corrected Relative Strength Study

Thinkorswim Scan Relative Strength

Thinkorswim Scan Relative Strength

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

Lean More:

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


*Thinkorswim is a chart analysis platform offered by TD

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.

Watch the video, Thinkorswim Scan Relative Strength below:

About Pete Hahn

For those trying to contact me about our professional services you will find all those details here: Any questions not related to our professional services or premium indicators should be directed to the comment section of the applicable video or you may post a question in our Q&A Forum:

Questions? Comments? Post a review?

64 thoughts on “Thinkorswim Scan Relative Strength

  • Jaalam Aiken

    Hi. Thank you so much for the detailed explanation and work you have done. Would it be possible to modify this so that it is even more useful? This seams to rely more on correlation than proportional strength (e.g. It is fine to identify stocks going up when SPY is going down, but if SPY is flat and the stock is going up, will it find it?).

    Essentially I want something that will look at the percent change in Stock A and compare it to
    the percent change in SPY over the same time period – however, that change has to be
    proportional to the stock’s price and its average true range as well. Volume should be included in
    this attribute so you don’t get stocks that made a big move off very little volume showing up.

    Am I hoping for too much? I know I wouldn’t be able to code this but I thought you could possibly pull it off. Thank for everything you do!

  • Scott Welsh

    Hi Pete. Thanks for the work on the Relative Strength Scan. Unfortunately after watching the video twice, I can’t seem to get the “OK” button in my Scan to become clickable. It stays grayed out no matter what I attempt to do. Screenshot here: I’ve downloaded the file, checked the start dates, and copied the code from the ScanRelativeStrength Study into the Scan. Let me know if there’s any hope for me. Thanks!

    • Pete Hahn Post author

      I can confirm that you have missed some of the steps which I explain in the video. When you paste the code into the study filter of the scan there are lines of code which must be modified. All of that is explained in the video, step-by-step.

    • Pete Hahn Post author

      Not much detail to work with. I suggest you go back and view the video. If the code is giving you errors that means you missed the steps that show which lines of code must be modified in order to use this as a scan.

  • Alan T. Tong

    I have recently watched the TOS Relative Strength Scan video and thought it would be extremely useful. I have uploaded the study but whenever I try to run the scans it says no stocks found. Same message with all 4 of the scans. Checked the code and I believe it is correct. Is there a fix that I can do.
    Thanks so much.

    • Pete Hahn Post author

      Check that you are using the daily time frame and that you have correctly set the comparison start date to a day the markets were open for regular trade.

      • Alan T. Tong

        Thanks for your prompt reply. Chart is set on the Daily timeframe and the date is set to 1 July 2021 [20210701].
        Appreciate your help.

      • Pete Hahn Post author

        I set up the scan using your start date and it’s working without any issues. I noticed you said the “chart” is set to daily time frame. But the chart has zero affect on the settings used for the scan. So the Study Filter needs to be set to daily time frame and when you paste the code into the Study Filter you must set the date for the user input named “referenceDate”.

    • Pete Hahn Post author

      The screenshot does not help in this case. This error message has been reported by some viewers on our YouTube channel. It does not happen for all users of Thinkorswim and the issue only started recently. Your screenshot does not show which top level filters you have applied to the scan (that was the most important detail you should have included in your screenshot). I suggest you apply some top level filters that are appropriate for this scan. For instance if you are using the ticker symbol “SPX” for the user input named “CorrelationWithSecurity”, your top level filter should be the stocks of the S&P 500 index. Since your error message contains a Forex currency pair I can only suggest that you have failed to setup the appropriate top level filters for your scan. If this does not resolve the issue you will need to contact support at TD Ameritrade because the problem is likely something that needs to be corrected on their servers.

      • Imani

        Thank you so much! I was able to succesfully correct it by scanning through the s&p500 filter.