Custom Watchlist Columns Based on the TTM Squeeze Histogram
![Thinkorswim TTM Squeeze Watchlist](https://www.hahn-tech.com/wp-content/uploads/2015/11/Thumb-TOS-Sqz-Watchlist-300x169.jpg)
Thinkorswim TTM Squeeze Watchlist
With this tool, just a quick glance is all it takes to see which stocks are trending. This video shows you how to display the TTM Squeeze histogram colors in a custom watchlist column. Add multiple columns to the watchlist, each referencing a different time frame. Easily see which stocks have the TTM Squeeze direction aligned across multiple time frames. Free custom code is included below. Just follow instructions in the video to copy/paste this code and create your very own custom watchlist columns.
No source code is disclosed as the Thinkorswim platform provides access to the plots while keeping the proprietary code out of sight.
Learn More:
Click and drag interface to build custom watchlist columns. No code experience required:
Thinkorswim Condition Wizard Watchlist
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.
input price = CLOSE;
input length = 20;
input nK = 1.5;
input nBB = 2.0;
input alertLine = 1.0;
def squeezeHistogram = TTM_Squeeze(price, length, nK, nBB, alertLine).Histogram;
plot hist = if squeezeHistogram>= 0 then if squeezeHistogram > squeezeHistogram[1] then 2 else 1 else if squeezeHistogram < squeezeHistogram[1] then -2 else -1;
AssignBackgroundColor(if squeezeHistogram >= 0 then if squeezeHistogram > squeezeHistogram[1] then color.CYAN else color.BLUE else if squeezeHistogram < squeezeHistogram[1] then color.RED else color.YELLOW);
hist.assignvaluecolor(if squeezeHistogram >= 0 then if squeezeHistogram > squeezeHistogram[1] then color.CYAN else color.BLUE else if squeezeHistogram < squeezeHistogram[1] then color.RED else color.YELLOW);
How can I combine this script with your TTM Watchlist histogram script?
That should print the number of dots and their color based on white or black type on top of your bar colors.
input price = CLOSE;
input length = 20;
input nK = 1.5;
input nBB = 2.0;
input alertLine = 1.0;
def squeezeDots = TTM_Squeeze(price, length, nK, nBB, alertLine).SqueezeAlert;
def alertCount = if squeezeDots[1] == 0 then 1 else if squeezeDots == 1 then alertCount[1] + 1 else 0;
#def alertCount = if squeezeDots[1] == 0 and squeezeDots == 1 then 1 else if squeezeDots == 1 then alertCount[1] + 1 else 0;
plot data = alertCount;
data.AssignValueColor(if alertCount > 0 then Color.BLACK else Color.WHITE);
####AssignBackgroundColor(if alertCount == 0 then Color.RED else Color.GREEN);
### This background will come from the Hahn_Tech Custom Watchlist Columns Based on the TTM Squeeze Histogram below.
input price = CLOSE;
input length = 20;
input nK = 1.5;
input nBB = 2.0;
input alertLine = 1.0;
def squeezeHistogram = TTM_Squeeze(price, length, nK, nBB, alertLine).Histogram;
plot hist = if squeezeHistogram>= 0 then if squeezeHistogram > squeezeHistogram[1] then 2 else 1 else if squeezeHistogram = 0 then if squeezeHistogram > squeezeHistogram[1] then color.CYAN else color.BLUE else if squeezeHistogram = 0 then if squeezeHistogram > squeezeHistogram[1] then color.CYAN else color.BLUE else if squeezeHistogram < squeezeHistogram[1] then color.RED else color.YELLOW);
The best place to find solutions like this is in our Q&A Forum. And it would be the only place I would attempt to provide a solution of this complexity. (comments section of a video is not intended for addressing custom script solutions).
You can access our Q&A Forum from any page on our website from the menu at the top. But here is a direct link to the Watch Lists topic of our forum: https://www.hahn-tech.com/ans/cat/watchlists/
When you open that page, you will find a search box at the top. Use that to see if your question has already been solved.
If you don’t find it listed, consider posting a new question in our forum.
What is the code for the squeeze histogram value displayed inside a label in a TOS chart rather than on a watchlist? Is that possible?
The best place to search for solutions like that is in our Q&A Forum. Using the search function in our Q&A Forum I was able to find the following solutions have already been provided:
https://www.hahn-tech.com/ans/ttm-squeeze-histogram-bar-count-in-label/
https://www.hahn-tech.com/ans/creating-squeeze-labels/