Thinkscript Overview
Think or Swim is my broker, and they are great. Lower commissions than full retail, pretty good tools, and you can trade stocks, options and futures from same account. They have a web-based platform, which is important to me as a backup. Plus, ToS also updates their software regularly, adding features and killing bugs.
Thinkscript is Think or Swim’s code for creating customized indicators, paintbars, and even strategies. It doesn’t support automated trading, but it does give you a lot of control over what you see and how you see it. ToS spends lots of time doing good work on the software, but the documentation of Thinkscript is utterly abysmal improving somewhat. There is a dearth of information about Thinkscript on the web at large. These are some other bloggers I have found so far that work with the code:
http://thinkscripter.wordpress.com
http://thinkscript.blogspot.com
http://moolaladotorg.wordpress.com/
http://chartingwithchris.blogspot.com/
http://tradermd.blogspot.com/
http://tosindicators.blogspot.com/
I got some good ideas and early understanding of the code from their sites. Other than that, it seems that ToS script developers are all on their own. Well, the age of darkness is past! See my Google download site for a listing of indicators I have written, including source code. You can also find things by browsing the “Thinkscript” tag from the sidebar. Also, I have a tutorial for how to apply the scripts to your charts.
Feel free to contact me if you have questions or need any custom work done.
“If you’re good at something, never do it for free!!”
(Yes, I will answer questions for free. I’m a pushover)
May 17, 2009 at 4:14 pm
I’ve just recently come across your site and have been passing it on to other fellow traders. Great work!
I’ve got a quick question. Do you know how to get strategy data on periods less than a day for longer than 20 days with thinkscript?
Todd
August 27, 2009 at 5:21 pm
Great blog, been following you for a while and thanks for helping us small guys out. I have a question, can you create a code where i have a color code that follows the first 5 or 15 min bar and then changes a different color at the start of the next bar. The strategy is to buy right above the first break of either the first 5 or 15 min bar and it will change color from the opening range which makes it easier to see., if that helps you understand what I am looking for.. Thank you and keep up the great website.
Thanks
Jason
August 27, 2009 at 5:37 pm
Yes, try my “shaded opening range” indicator:
If that’s not what you mean, let me know!
September 9, 2009 at 5:15 pm
Love your work. Can’t find your email address for one of my questions: Have you been able to get dynamic hide to work properly? For some reason I can’t and I would also love to get pivot points for today only. Any help would be appreciated. THanks
September 9, 2009 at 5:40 pm
Adam,
Yes I have. I’ve got it working in one of my own beta pivot scripts. I’ll clean it up and do a post on it when I get some time.
December 30, 2009 at 3:54 pm
Forex trading really changed my life, although I must admit I really battled to get my head around some of the concepts, once I got going for real I have been doing really well.
March 14, 2010 at 3:52 pm
The TOS thinkscript manual says not a word about the math function (their category) named “crossover”. The scripts that come with TOS all use this function in exactly the same way. The term “crossover” is used as a process description so web searches don’t help. The statement definition under functions hasn’t helped me. Can you describe and/or illustrate its general use or send me a URL that does this. == Thanks, Lee
April 13, 2010 at 9:29 pm
[…] Read the Prospectus, a thinkscript blog, (thinkscript overview) […]
November 12, 2010 at 12:39 pm
I wonder if by chance you have a script or anything along the lines I am looking for some timer or a way to flag ( alram /indicator ) that points the last 10 seconds of every 5 minute bar during the day .
Some how a way to inform the trader that the 5 minute bar is about to finish ?
I have seen some suggestions about Def start time and Def end time in seconds ,, but not sure how to code this into meaningfull alert or flag
thanks
guy H
November 12, 2010 at 2:32 pm
Interesting! I’ll look into that.
November 14, 2010 at 10:23 pm
I looked at this, and it seems that the time functions only operate on the open of the bar. I’ll keep thinking about it in future, and maybe I’ll think of a way around it.
November 15, 2010 at 11:28 am
I actually had a suggestion from another indiv. that looks very good his suggestion is
Def start = secondsFromTime(0000)/300%1==0;
Def end = secondsFromTime(0000)/310%1==0;
which actually marks first 10 seconds of every 5 minute bar ,
this looks great to me and I owe him ,, I say preety good and clever way .
, All I need now is to turn this into a flag which I am working on , if you have a quick fix feel free ,to express your creative programming .
Also if you have comments on this suggestion by Bob these will be appreciated
November 15, 2010 at 12:18 pm
That definition is great, but TOS doesn’t process the time intrabar. It only looks at the opening timestamp. Secondsfromtime and Secondstilltime don’t use the current time, they use the bar opening time. The value returned from those functions doesn’t change intrabar, so you can’t currently use those functions to get a bar timer.
November 15, 2010 at 1:41 pm
well possibly the hard way can be coding every 5 min as time
0930 0935
0935 0940
0940 0945
etc. and then testing if secondsfrom < 10 for each one is true
will get the flag for the first 10 sec of every 5 min bar
your thoughts?
April 25, 2011 at 6:03 pm
Does thinkscript have the capability of searching for strike prices and premiums and applying those in a formula to determine if the result is + or negative and then to search for all positive results over the universe of options?
Mike 609-412-5450
April 28, 2011 at 12:15 am
Nice stuff. I use a lot of watchlist custom columns for true/false indicator values based of study codes and was wondering if you have code to indicate if the current day’s first 5min or 15 min volume is greater then the average of the x-days’ first bar. Thank for any help you can provide.
April 26, 2013 at 11:51 am
Very great post. I just stumbled upon your blog and wanted to say that I have truly enjoyed browsing your weblog posts.
After all I’ll be subscribing for your feed and I am hoping you write again soon!
April 4, 2021 at 8:06 pm
I found an indicator from a tosindicators.com youtube video. I’m impressed with my initial research. What can you tell me about this outfit? I’m searching for reviews.