Adding Custom Columns to a Watchlist in Thinkorswim

Thinkorswim Custom Watch List Columns
Tired of looping through dozens of charts just to find the few stocks that meet your criteria? Wouldn’t you rather just glance at your watch list and instantly see those half dozen stocks all sorted at the top of your list? Looking for the needle in the haystack can be tedious and time consuming. This video demonstrates how to combine the power of a custom watch list column with a custom scan. Running live on an active market, these two tools combine to create a dynamic filtering engine to help you find those little nuggets that take you hours to uncover. The link below is to download the source code for the custom column indicatory demonstrated in the video. Just follow the instructions in the video to create your own custom column in a watch list.
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.
Hi, first of all Thanks a lot for everything!
You’re the Best Mr. Pete Hahn.
Is there any way to show “Buy” , “Sell” or something else, instead of 0 ,1 or -1 , in the watchlist column?
Yep, there sure it. We have plenty of examples in the Q&A forum showing how to display text values in place of numeric values in a custom watchlist column. The only reason we did not include that in this video is because this video is an introductory video that covers only the most basic concepts.
Greetings, I used my all custom watch lists in TOS and now unable to add new watch lists as there are no custom watch list left which i can modify according to my desired code. Would appreciate any input to fix it.
Check the comment from Dan dated October 25, 2019 at 8:59 am, further down on this same page. Dan found a way to increase the number of available custom columns available.
Got it.. Thank you so much.
Whats the workaround for “custom expression subscription limit exceeded” when making custom edits to watchlist for background colors? My code is right. I’ve deleted and added back smaller watchlist and still no luck
There is no workaround. There is a fixed limit to how many custom columns can be computed in a watchlist. You can exceed this limit buy adding too many custom columns to a watchlist OR by adding to many rows (ticker symbols) to the watchlist.
….and I will add that custom columns applied to other watchlists will also count toward that limit.
Thanks for the rapid response! Tried the paper account and it worked for only about 50 ticker symbols. Maybe a different platform offers these features. Simply trying to set custom watchlist columns for Ichimoku signals like Tenkan crossing above Kijun.
There may be a lower limit for PaperMoney than for Live trading. I know the limit for live trading is several hundred. Did you try it on the live trading side? If your account is not fully funded this may also limit many resources on the platform. You really need to contact TD Ameritrade for more details.
and remember the limits is not “per watchlist” or “per custom column”. The limits are applied based on all custom columns added to all active watchlists. You can have several custom columns set to several different watchlists and hit the limit with only 50 ticker symbols in each.
Excellently presented. I utilized scripts from a Strategy in my watchlist. The watchlist alerts the event. Then I jump to the charts for that symbol with the Strategy for further evaluation to open a trade or not. Thanks much!
Thanks for taking the time to provide your feedback. I love to know when our videos inspire our viewers create solutions of their own design. Fantastic.
when i try to download Watch_EMA_XSTUDY.ts it downloads it into the quick time player and it does not open
thank you
The solution is found in our FAQ’s. Which is accessed through the Help menu at the top of this website. Here is a direct link to that solution: https://www.hahn-tech.com/ans/how-to-download-and-import-study-ts-files-into-thinkorswim/
Hi Pete,
Can you show the trend reversal in intraday in watchlist where stock is trening down or up in different time frame so it is long when it changes the uptrend vs short when it changes downtrend with green or red color? I need script for that.
Thanks.
First you have to define how you measure this “reversal”, then explain how you measure “trending down or up”
Since this is for intraday, I need to see which stock in my watch list has “pullback” after it opened up high or if it has “gone up” after it opened low after the bell. In summary;
….. how to sort stocks in your ThinkOrSwim watchlist by the % it has pulled back from the day’s extreme. So if it is a red day, the pullback % would be from the low of the day: a 2% reading would mean that the stock has pulled back off the low of the day toward the high by 2% of the day’s range. If it is a green day, a 5% reading would mean that the stock has pulled back 5% from the day’s high.
This ThinkOrSwim indicator column should you a good way to sort and find stocks that are pulling back and giving a more attractive entry location. this is to spot stocks trading at or near their daily highs or lows, and that might be ready to breakout to the upside for a long trade, or breakdown to the downside for a short.
The Multiple Timeframe Pullback & Reclimb Indicator should display 5 minute daily, weekly, monthly or yearly pullback (defined as the decline from the chosen period’s high as a percentage of the period’s total range) or reclimb (defined as the gain from the chosen period’s low as a percentage of the period’s total range).
This study will allow you to quickly identify stocks making new period highs or lows.
Thanks.
The solution to this is light-years beyond the scope of anything we could provide in the comments section of a video. I suggest you take some time to browse existing solutions in our Q&A forum. Here is a link to the Watch List topic of the forum: https://www.hahn-tech.com/ans/cat/watchlists/
Hi Pete, thank you for such an abundance of information. Is there a way to add a watchlist column that will indicate (color change) when the ask is above, near and or below my avg price?? Any information would be greatly appreciated. Thank you.
Did you search our Q&A forum for this? That is the best place to find an answer. If you don’t find the solution then post a new question. If you just want some guidance on how to do this on your own you can always consult the language reference yourself: https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Fundamentals/ask
Why is the “last” parameter rejected, while “open” and “high” are accepted in a column study?
def Opn = open(period=”DAY”;
def Hi = high(period=”DAY”;
def Lst = last(period=”DAY”;
To clarify, this is the actual script that I am trying to create.
For some reason, the script is not recognizing “last”.
def Opn = open(period=”DAY”);
def Hi = high(period=”DAY”);
def Lst = last(period=”DAY”);
rec Move = Lst – Opn;
rec OTMValue = ((Lst-Hi)-(ceil(Lst)-Lst));
rec OptionMult = 100/(Lst * .01);
rec YesNo = if (Lst-Opn)/(Hi-Opn)<.75 then 0 else 1;
plot ratio = (Move – OTMValue) * OptionMult * YesNo;
Wow, lots to talk about here. Probably should have posted this in the Q&A forum where we can provide a more detailed solution. One, secondary aggregation periods are not supported for custom watchlist columns. Two, “last” in invalid, period. We have several fundamentals to pick from and “last” is not one of them. This link contains the full list: https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Fundamentals Third, there is a missing semicolon on your last line of code. Fourth, you have marked the last four lines with the “rec” keyword, but none of those statements uses recursion. (number four is minor and has no bearing on whether the code will work).
Hi Pete, I have a custom column created for my watchlist. It show up fine on PC but not on TOS mobile. I’ve tried many ways to simplify the code but to no avail. Currently I’m suspecting that “if” , “then” and “else” cannot be added in any script that you want to view on TOS mobile. Could I confirm if that is your experience too?
I have a library of tutorial videos that cover the mobile app. I published on showing an example of a custom watchlist column. The video explains what is supported and what is not: https://www.hahn-tech.com/thinkorswim-mobile-watch-list/
Hi Pete,
Is it possible to use the ‘AsDollars’ reference to format custom code for a scan column?
This is the code I have so far but unable to format with the $ and two decimal places.
Any insight?
Thank you!
plot Bet = volume*100*0.5*(ask()+bid());
Bet.AssignValueColor(if Bet > 1000000 then Color.Green else if Bet < 300000 then Color.Red else Color.Yellow);
https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Others/AsText.html
Hi Pete,
Thank you!
I have attempted the AsText string in addition to the AsDollars string and still getting errors in the code.
Will these strings work in watchlist columns?
Yes, they do work in custom watchlist columns. Perhaps you should post this in the Q&A forum where we can provide more in depth assistance. Be sure to include the exact code you are trying to use. Even if it produces errors.
Hi Pete, can you show me how to do the watchlist to indicate DMI D+ crosses above ADX as well as D- crosses above ADX line? I am still learning writing TOS script and appreciate your help.
Yes, of course. We already published a video on that: https://www.hahn-tech.com/thinkorswim-adx-dmi-watchlist/
If you don’t find the answer in that video you may submit a question in the Q&A forum.
Hi Pete, I have a simple script for custom watchlist set at Day:
close > open (period = “MONTH”)
result : NaN
is secondary aggregation not supported for custom watchlist ? thanks a million
That is correct. Secondary aggregation is not supported in custom watchlist columns.
thanks very much for the quick reply. I guess I could use a 30 min aggregation and write the code to aggregate those into an hour to match the chart. I would like to start at the bottom of the hour.
thanks again for your help.
Hi Pete, great stuff here. My question: When does the aggregation period start for the hourly aggregation? In a chart itself I see an option to start at market open or not. In a study, that I created that is used in a custom column it appears to start at the top of the hour. Haven’t been able to confirm this via TOS help, however.
What I have done is create code to detect an inside or outside bar. It works on all time frames for different columns (Month, Week, Day) except hour. I suspect that the Hour aggregation in the study is not starting at the same time as the setup in my chart. Can you help?
Thanks,
Pat
This has been addressed in our Q&A forum. The charts must be set natural aggregation start. So the box for that setting must be unchecked. Every other tool on the platform uses the natural aggregation start time. So the charts must also use the natural start time or they will not match.
Would it be possible to create a dynamic watchlist with the TTM Squeeze?
Hi Pete. I found your website about 2 weeks ago and it is awesome. Thank You! I reviewed the QA forum and was able to set up the squeeze histogram color in my watchlist. Can you help me with customizing my watchlist so that the color of the TTM C wave histogram appear in my watch list? I reviewed the post that explains how to assign a color to the A wave but I am having trouble with creating a code for the C Wave histogram.
Hi Corey, go ahead and submit this as a new request in our Q&A forum.
Pete- thanks for this..very useful indeed. Can this be done- I wanna add 5 custom columns and use them in a watchlist..where I wanna practise – paper trading but w realtime data …so its as follows…col 1 is cost basis- which I will provide based on what price I bought XYZ stock, col2 is cost total (calc as pos qty X col 1) ; col 3 is buy trigger (a 4 decimal place price I provide based on tech/fund anal); col 4 is sell trigger (another 4 decimal price field I provide); col 5 will be action status (calc. as display “BUY” when current price is 105% or less of col 3 and display “SELL” when current price is 95% or more of value in col 4). Can this be done in paper trading or realtime connected trading mode?
Also, will I be able to send alerts txt or email when buy or sell trigger is hit?
No. Once again this is not supported by custom watchlist columns. Notifications of any kind are not possible from any custom watchlist column.
No, sorry. This is not at all how the custom columns function. There is no way to for any custom column to read any data from any other column in the watchlist. They are not connected and there is no way to connect them.
do u know of any other platform like schwab etc (any other than TOS) where these 5 columns can be created and used to trigger real time alerts? Also does TOS or any other platform offer API calls for real time price data that I can use in goog. sheets as I have setup these column in goog sheets but problem is that goog updates get limited to once every 5-8mins
Ok, that makes sense. You have a spreadsheet solution. No platform is going to be able to apply a spreadsheet solution to a watchlist. This may seem like a small detail but it’s important you grasp the difference in order for you to understand how to find what you are looking for. Sierra Chart provides spreadsheet solutions. So if you have a spreadsheet solution and want to apply that to live or automated trading. Sierra Chart is the platform for you.
Peter, I want to scan and filter all the stocks (S&P, DOW, etc) to find specific stocks to screen and find stocks that find a specific parameter such as “IV percentile”. How can I do this? We are using TOS platform, you are a Rock Star!
I see in this video that the watch list is running and updating all day as price crosses the EMA. Can I get this to operate the same way on say the TTM Squeeze Histogram, as price changes the colors change throughout the day? Is that a function of using the Plot Scan statement? I guess what I am saying is I want every indicator I put in the watch list as it switches from low to high or crosses to update and give me an assigned color in real time as price changes all day.
On this very same page…. did you have look over at the left hand side of the browser, where we have a navigation menu showing a list of all videos in this same topic?
Been a TOS user for 2 yrs… just understanding scripts thanks to your custom watch list video… can I write a code that will allow for a (1) to appear in the custom column when the 10 day MA crosses either above or below the 20 day MA?
Sure thing. Oddly enough this has not been requested in our Q&A forum yet. Go ahead a post this request in the Watchlist topic.
So far I love the Custom Column. Unfortunately, I have to write 3 different scripts and use on different aggregation period namely Monthly, Weekly, and Daily and that used up my limited amount of Customize Columns that I can have. What is the way to add that option so that I can just have one script but I can just select an option to set the timeframe??? Greatly appreciate you for the help and the time.
I hear what you are saying. We have a limited number of custom columns. There is no way that I know of to use the same one for different time frames.
You can “share” your own column, then open the shared column to obtain a new column.
You can do this multiple times and just change the timeframe and the name to speed up adding columns with the exact code when you need multiple instance for different time frames. Or you can open a shared column and then change the name to something generic and just delete the column contents – then you have a fresh column.
Took me awhile to figure that out – I thought I ran out of the limited number of custom columns too. But if you share it to yourself then you yield a new custom column!
To “share” open up the script panel in the columns editing menu and then open up the colum script and click on “share” in the top right corner of the editor. Next open your shared items panel and copy the link. Finally go to your main screen to the “open shared items” menu and copy the link to rename it. Hope this helps everyone.
That’s awesome. Thanks for taking the time to share this.
Just wanted to thank you for posting this. I am going to check it out. I am new to TOS but really like the vast array of customization available. Would it be difficult to have the same kind of EMA break study but for breakout on upper Bollinger Bands (of multiple timeframes)? I am not the best programmer, prob could do it if given enough time. Do you offer this kind of customization as a service?
(For example: Price > Upper Bollinger band (20,2 – weighted) on 5 min), (.. 15 min), (.. 30 min), etc with customization allowed for bollinger period, dev, weight). use yellow color when price > 5 min upper bb, price > 15 upper bb.,etc. Going to try to apply your example first as I think you have the basic framework. Thanks again
Hi Doug. Glad you know you found the video helpful. Always great to see when viewers get new ideas after viewing our videos. As to your specific question. We cannot apply more than a single time frame to a column in a watchlist. Each watchlist column is assigned its own time frame. In order to represent more than one time frame in a watchlist requires that you additional custom columns, one for each time frame.
thank you Pete.
TOS has script in the custom column that allows one to dropdown menu to select different time frame. eg. Woodiespivot or ADXCropssover , etc. Once you add to the current set…you have the option to select or choose which time frame. Any help from others is much appreciated.
Yes. And this only applies to the standard columns that Thinkorswim provides. There is no way to do this with custom columns.
Mr Han,
Is it possible to add a custom column which will display when the symbol was added to the watch list for intraday trading ?
thanks.
No this is not possible.
thanks for this effort Pete- could u suggest how can I add 3 custom columns to use in watchlists (which I want to use as strategy evaluation)- 2 of those columns will be user entered by me- Qty, purchase price and the third calculated as running P/L for position- calculated as qty * (last price- purchase price). Thanks
You cannot do this with a watchlist in Thinkorswim. You would need to use a spreadsheet for this.