Thinkorswim Divergence Lines Upgrade 33

This version has been replaced by new versions located on the following webpages:

Standard Divergence:

Hidden Divergence:

Thanks to a huge response and feedback from our viewers we are very excited to publish version three of the Divergence Premium indicators for Thinkorswim. Along with the new version we have published a video titled “Thinkorswim Divergence Lines Upgrade”. We are also including a custom scan along with the upgraded version. Customers who already purchased version two are receiving the upgraded version at no extra charge! In this video we show how to adjust the settings and run the scan. And there is a live chart demo showing how the chart based alerts function. At the request of viewers, we have also added a companion study, available separately. The companion study measures divergence in a different way.


  • Indicator Type: Momentum
  • Indicator Basis: Price momentum diverging from price action
  • Time Frames: All supported time frames and aggregation periods
  • Trade Setups:
    • Trend reversals
    • Taking profits
    • Scalping

We realize there are many techniques employed for reading divergence. We tried to be as accommodating as possible within the limits impose by the Thinkscript language. I’m sure you will be very excited to see the new ways these indicators can be customized to fit your needs.

Need more information?

To get pricing and see how to place your order click the link below.

Thinkorswim Premium Trading Tools


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.

Watch the video, Thinkorswim Divergence Lines Indicator below:

Technical description of how the code works:

The code is designed to locate swing pivots in price. This is the first step. The swing pivots are defined using a default lookback period of 3. Increasing the lookback period causes the code to locate larger structures (macro as opposed to micro). The swing pivots are set by default to compare highs and lows. This can be adjusted to compare the close of each candle instead of the high/low. When plotted, each swing pivot is marked with a blue square.

For each swing pivot, the code compares the value of the lower study at the current swing pivot to the value of the lower study at the previous swing pivot. Lower swing pivot with a higher price momentum will generate a positive divergence signal. Higher swing pivot with a lower price momentum will generate a negative divergence. The default is to compare (on the price chart) low to low and high to high, in order to determine if swing pivots are higher or lower. This behavior can be adjusted so that the comparison is made from close to close.

Before requesting to purchase any of these indicators it is very important that you watch the demo video, otherwise you will not have the knowledge needed to adjust the indicator settings to get the behavior you seek. 


*Thinkorswim is a chart analysis platform offered by TD

TD Ameritrade provides financial services including the trading of Stocks, Futures, Options and Forex.

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?

33 thoughts on “Thinkorswim Divergence Lines Upgrade

  • David

    Hi, is the standard divergence RSI works for timeframe weekly or dayly or 4h?, i did no see this examples in video

    • Pete Hahn Post author

      I have not found a time frame that is not supported by these indicators. There is nothing in the code that is based on date/time information. It only measures changes in values over specified number of bars. If you would like to see something specific you can fill out the order form and request specific screenshots in the questions/comments section of the order form.

    • Pete Hahn Post author

      Sorry but no. None of our premium studies provide buy and sell signals. The only studies that would provide buy and sell signals are not studies at all. Rather they are more accurately referred to as “Trading Systems”. A trading system incorporates many different indicators and patterns into a signal “system” or “trading setup”. Any trading system you might find must also include the ability to backtest and optimize it’s performance using various user inputs settings. When you find one that can produce consistent trading profits you should expect to pay several hundred dollars or more.

    • Pete Hahn Post author

      Yes, I have created several customized versions of our divergence studies for clients. After purchasing the standard version there is a modification fee to create the customized version that you require.

  • Rudy

    Hi Hahn,

    Is does RSI Hidden divergence lag by 3 candles to confirm the divergence?

    Ive seen your video but I couldnt tell if it confirmed the line after the 3rd candle.
    I mainly use Daily chart so I assume that if I use it as a scan, the confirmation would come up 3 days after it already happened.

    • Pete Hahn Post author

      No, the right side strength of the swing pivots is 1 bar. The divergence signals are locked in at the close of the bar that immediately follows the divergence signal.

      • Rudy

        Awesome, 2 more questions.
        Does it catch both bullish and bearish hidden divergence?
        And is it both an upper and a Lower study?

      • Rudy

        Last Question Hahn,

        I’m mainly looking for posible trend continuation using hidden divergence. Which hidden divergence did you use on this video at the 21minute mark,
        Was it the MacD or RSI hidden divergence?

      • Pete Hahn Post author

        I have no idea. Not at the computer today so I can’t view it at this time. The name of the chart study should be displayed on the tittle bar of the chart. And I probably matched the hidden divergence with the lower study so that it would be clear which divergence was being measured.

    • Pete Hahn Post author

      Thanks. But I don’t have the slightest idea how to detect when hedge fund get in the market. From what I hear, hedge funds are folding are a record rate. Stocks have been going straight up for well over a decade and nobody really needs a hedge fund anymore. That’s what I hear anyway.

      • Pete Hahn Post author

        None of our premium indicators are designed for specific trading styles, trade durations or time frames. All of our premium indicators are designed to be adjustable to fit the widest possible audience.

    • Pete Hahn Post author

      We have created several modified versions of our divergence studies for clients. The modification fee to swap out one of the two lower studies is $75 USD (after paying the full price for the premium study). The ForceIndex is an oscillator type study and therefore is a candidate to be added to our divergence studies.

      • sss

        ok thanks. where can i find info on the hidden divergence indicator? I tried searching online however i couldn’t find much.

  • David Gellman

    I am looking for a “scan” program for TOS to locate candidates that have experienced divergence bottoms or tops and can be scanned in any time frame (ex. 15 min, 1 hour, daily, weekly etc.) and return a list of those symbols which have met the criteria. It can be based on divergence with MACD or RSI…… Also, if you are familiar with the Connors “Turtle Soup” setup, which is also basically a divergence setup that does need to be used along with any indicators, that would also be ideal.

    Do you have any scans that can screen for any of these conditions?

    • Pete Hahn Post author

      Did you watch the entire demo video for this indicator? Because in this video we do demonstrate that the indicator includes code to run scans for divergence signals. I have no knowledge of “Connors Turtle Soup” so i have no comment on that.

  • Stephen Hobbs

    Hi. Does the divergence line include the capability to use ToS scan to find stocks that fit the criteria? If not, is it possible code ToS scan to find stocks that fit the divergence line code? Thanks.

    • Pete Hahn Post author

      You really need to watch the entire video. If you have any questions that are not covered in the video I will be more than happy to answer them. The demo video serves as the entire use manual for this indicator so it is absolutely essential you watch the entire video from start to finish.

      • Pete Hahn Post author

        No. contributions are entirely voluntary. I went to great lengths to make sure there was no way to confuse that. Viewers who leave a contribution receive absolutely nothing in return. It’s basically a tip jar. When one of our videos provides free code. The code is indeed free. Just find the link inside the video and download it. Keep in mind you have left this comment on a video for one of our premium indicators. So this video in particular does not provide any free code to download.