Adding Custom Columns to a Watchlist in Thinkorswim
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.
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.
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://toslc.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://toslc.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://toslc.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.