TTM Squeeze RadarScreen for Thinkorswim

[Update:  Recently TOS incorporated TTM's code into their proprietary studies. Unfortunately, this technique will not work for proprietary studies. :-( -andy]

Last week I was watching a video webinar over at Trade the Markets. Someone asked if Thinkorswim had the ability to display the status of a squeeze in a RadarScreen type of window. The short answer is yes with lots of caveats. I will walk you through the procedure.
The first thing you will need is TTM's squeeze indicator or an open source version of squeeze. You can get one from TTM here. These instructions are specific for TTM's squeeze so you will have to modify them for your particular indicator.

Go ahead and start Thinkorswim and click on the MarketWatch tab and then the quote sub tab. You should see a screen that roughly looks like the one in the picture above (without the squeeze columns).  Now we are going to add the squeeze indicators to a column in your quote screen.

  1. In a chart window, select Studies->Edit Studies. That will open up the Edit Studies and Strategies window. Under the Studies tab select and right click the TTM_Squeeze study. Select copy. If you don't see TTM_Squeeze, then you don't have the study. You will have to get it to proceed.
  2. A new thinkscript window will open. Rename the study TTM_SqueezeCol.
  3. Remove every line with the word momentum in it. This study reference the ExpAverage function which according to the tool is deprecated. Hard to believe. If there are any errors, you will get a message at the bottom of the window. 
  4.  Remove the lines with squeeze in them (such as plot squeeze) and squeeze.AssignValue, etc.
  5. change def BolKelDelta ... to plot BolKelDelta.
  6. Hit Ok. Hit Ok again. Thinkorswim will add the new study to your chart.
  7. Left click the small grey dot just to the left of the Symbol column header and select Customize.

  8. You should see the window below. Select one of the Custom studies and then click the Add Item(s) >>  button.
  9. After you click the button you will get a think script window.
  10. Name the Column "SqueezeHr".
  11. Set the Aggregation period to 1h (one hour, or whatever you want.). One advantage of TOS over TS is that you can have a column for each period that you want to scan.
  12. Delete the text SimpleMovingAvg() and copy the following code into the window
    plot BolKelDelta = TTM_SqueezeCol();
    def signal = if( BolKelDelta >= 0) then yes else no;
    BolKelDelta.AssignValueColor(if signal then Color.Green else Color.Red);
  13. You should now have something that looks like the image below. Go ahead click and OK.
  14. You should be back in the Custom Studies window (see picture in Step 2). As an added bonus, scroll down the available items window and the Send to [1] Red column to your quote page. That way you can just click the square and your linked windows will all get populated at once. Click OK and you are done.
You final window will look something like this:

Thinkorswim doesn't allow you to plot text, but the colors and values tell you the story. An equity is in a squeeze if the value is red (<0). We are out of a squeeze if the value is green (>0).
Now go ahead add add extra columns for Day and Week.

It is possible to add columns for momentum and to indicate how long we have been in/out of a squeeze, but I will leave that article for another day.

Wow, check out the banks and home construction index. Something is getting ready to happen there. Gotta go.


Unknown said...

I just added a couple of steps to the beginning of the tutorial.

Unknown said...

TTM just added the squeeze study to TOS. These instructions may not be compatible with their new study.

JL said...

Hey Andy,

I am a member of TTM and Rob's trading room as well. I ran into this post on the TTM boards and on your site. I have been trying to get this to work in TOS without success. I was wondering if I could reach out to you for some help? Any help would be greatly appreciated.

Thanks for your contribution.

Unknown said...

Recently, TTM incorporated their squeeze study into proprietary TOS code. Unfortunately this technique does not work with their code.

sridhar said...

Andy do you have any updates on this?

Unknown said...

I do not have an update. Since TTM includes the squeeze into ThinkorSim, they don't distribute the code source anymore. If you look about on the internet you can find other peoples interpretation of the squeeze and apply this technique.

JFCO said...

Andy, what kind of script (from this very same example) would you use to indicate how long you have been in/out of a squeeze?

Thank you.

Unknown said...

Playtech Casinos in Arizona 2021 - Dr.MCD
The best online 출장샵 casino games at Dr.MCD If you งานออนไลน์ prefer the traditional slot machines, or goyangfc prefer games with progressive jackpots, then