The Complete Beginner’s Guide to Using Custom Thinkscripts
This tutorial will show you how to add custom Thinkscripts to your Think Desktop software. These instructions will walk you through how to set up any of the custom scripts I have published on my Google Site.
First, you download the file that you want to install:
Save it somewhere on your computer that you can remember to get to later:
If the file has a “.ts” file extension, then you are ready to import it and can skip to the next step. If it’s a “.zip”, then you need to extract it first. If you are on Windows, use WinZip. On a Mac, the built-in archive utility can’t extract password-protected “.zip” files. But Stuffit Expander (free download from Apple.com) can. When you extract the files, enter the donor password if required, then extract the “.ts” file somewhere you can remember to go find it.
Next, open Think Desktop, go to a chart, click on “Studies” and choose “Edit Studies”:
This brings up the “Edit Studies and Strategies” window. In the left pane is a list of all studies and strategies that are available for you to add to a chart. In the top pane there are the studies and strategies that are applied to the current chart, and the lower panel shows the parameters and settings you can change:
If you are importing a study, click the “Studies” tab in the upper left. If a strategy, then click the “Strategies” tab. Then to add the script you downloaded, click the “Import” button in the lower left corner. Browse to your file, and then click “Open”:
The file will be imported into your collection of studies. Now at any time you can scroll to it in your list and double click it to add it to any chart:
To see or modify the source code for any of the scripts, click the little parchment scroll icon next to its name.
And that’s it! You’re working with your scripts.







May 12, 2010 at 11:05 pm
[...] http://readtheprospectus.wordpress.com/the-complete-beginners-guide-to-using-custom-thinkscripts/ [...]
May 14, 2010 at 4:10 am
[...] http://readtheprospectus.wordpress.com/the-complete-beginners-guide-to-using-custom-thinkscripts/ [...]
June 29, 2010 at 8:59 am
Hello;
I am reading for a while your wrtting here and I wonder if you can help write a code for me,I am not a programmer I tried to write no lack up till now. Please let me know what are your rate or maybe you have a better Idea for me.
for example : I am trying to plot some signals using “Woodie CCI” for entry and exit
I can enclosed the code ,it is mainly cut and paste/
Hope to here from you soon
Thanks Reuven
June 29, 2010 at 9:36 am
I’ll send you an email
July 8, 2010 at 12:37 pm
Looking for help in altering the zig zag indicator so it would show labels on swings such as number of bars and and length of move. Is this possible? If so I would be happy to donate.
Thank you
July 27, 2010 at 11:39 pm
hi i want the range bar indicator for mt4 .please contact me
September 2, 2010 at 4:56 pm
Hi, I am looking for thinkscript programmers and also someone to help me develop strategies for TOS Prodigio. Do you know anyone available for hire?
Thanks again for your time,
Michael
September 2, 2010 at 5:07 pm
That would be me. Email me: readtheprospectus at gmail. I’m booked for the next two weeks though.
December 7, 2010 at 11:37 pm
Hi, I want to download weekly and monthly open/high/low/close data directly into Excel. How can I program or use your DDE programming to accomplish this for 1, 2, 3, etc weeks/months ago?
December 12, 2010 at 12:30 am
I wonder if you can help write a code for me. I’m interested in placing an alert / order based on a trendline break (oto with a trailing stop which of course is oco). The trailing stop would be a SMA + either a ATR volatility or Lookup as a confirming stop for exits. Please let me know what your rate is.
Thanks for your site,
Greg
January 12, 2011 at 10:48 pm
im new at this, im looking for a way to scan for stocks by using CCI .
can u help?
January 12, 2011 at 11:13 pm
Using CCI how?
January 17, 2011 at 2:27 am
Hi,
I have seen this request from people, but I have never seen the answer. I am trying to create a column on my watchlist that shows the current days volume as a percentage compared to the same time for the last 50 days. If the current days volume is higher than the average for the same time in days prior, then it would indicate the percentage above. If the percentage is below, then it would indicate the percentage below as a negative.
I was able to write a thinkscript that compares the current days volume to a 50 day average. It works well, but the numbers don’t have any reference to compare until the day is over.
Let me know how much you charge. I am new to thinkscript and would really appreciate any help.
Thanks,
Jack
January 17, 2011 at 5:50 pm
Hi, I was wondering anyone has or could build a trendline alert for TOS? I would want it to give an audiable alert anytime the trned line is broken, I would like to use it across all time frames if possible, Thx
April 19, 2011 at 10:30 am
Hi, I’m wanting to develop a simple RSI formula that can email me alerts when they happen. I reside in south africa I trade futures using the http://www.gt247.com ( global trader ) platform. I use netdania charts
Can you help
Regards
Domenic
27713019762
July 30, 2011 at 2:40 am
Hello,
I was searching for more info about thinkscripting and found your blog. I applause what you are doing, thanks.
Just a quick question from my side because I haven’t found my answer yet. I’m looking to creating a custom watchlist column that displays the percentage change from the day’s open. Basically something like plot percentChange = (close/open -1 ) * 100.
1- That doesn’t seem like the right open price and last price.
2- It doesn’t seem to update in real time whenever the last price changes.
Any pointers would be greatly appreciated. Thanks.
August 5, 2011 at 4:35 pm
Use (last-open)/open*100. Close is the day’s close, last is the last price.
September 11, 2011 at 9:13 am
Just an update about the percent change from open. The “last ” variable doesn’t exist. What I did is the following, as a watchlist custom column:
def O = open(period=”DAY”);
plot percentChange = round((close/O – 1)*100, 2);
percentChange.DefineColor(“Positive”, Color.UPTICK);
percentChange.DefineColor(“Negative”, Color.DOWNTICK);
percentChange.AssignValueColor(if percentChange >= 0 then percentChange.color(“Positive”) else percentChange.color(“Negative”));
The same code can be used for a custom study.
Unfortunately, the updates in the watchlist are a bit laggy compared to the study itself but it works quite well.
Permatrader
September 12, 2011 at 9:31 pm
I have just downloaded the # Prospectus study named
# CumTickv2STUDY
I was wondering if there is somewhere I can go to get an explanation for using this study?
If not, will you explain it?
September 12, 2011 at 9:37 pm
See here: http://readtheprospectus.wordpress.com/2010/10/25/cumulative-tick-study-v2-for-think-or-swim/
November 16, 2011 at 4:21 pm
hi! i like your work with TOS’s thinkscript. Would you happen to know the script for getting the bar number or exact time corresponding to the highest high/low on a 1 min Today chart? i’m trying to make a simple indicator that would in real-time show the time of day’s high/low or at least showing the number of bars that had elapsed from the day’s high/low to the current bar number. thank you.
December 7, 2011 at 11:35 am
Hi, I am not a programmer and would get some huge benefit from a particular function that I *think* thinkScript can execute. I was wondering if you’d be interested in helping me. I want something pretty simple – a watchlist of 100 or so stocks to give a notice when they are “inside” (low is greater than or equal to previous low and high is less than or equal to previous high) on a 30 min aggregation period. That’s it. I would like to be able to view if the condition is true DURING the period, with another column showing the prior periods TRUE’s. I would be happy to explain further (or clarify anything that wasn’t very clear!) if you think you could provide me some help. Thanks in advance.
December 29, 2011 at 7:47 pm
Hi I like to implement your tick study, but TOS gives me this info.
“Invalid statement: def at 12:1
No such variable: range at 13:15
calcValue: missing parameter”
Any ideas on how to fix it? Thanks!
p.s. don’t give up on your trading. trade the market not single stocks. don’t fight the market and create a plan. congrats on the child. best investment of all. best wishes.
May 15, 2012 at 10:01 pm
I’m running TOS DDE TEMPLATE and it does not handle options tickers.
May 25, 2012 at 12:16 pm
I’ll look into it
July 26, 2012 at 10:25 am
Hi, I just came across your website-do you have code that will automatically make a trade for you based on specific stocks passing technical indicators and fundamental indicators that can be specified? If so, which file is a sample of this kind of code?
July 26, 2012 at 11:20 am
No, I’m afraid I don’t.
November 12, 2012 at 3:27 pm
Hi
You are doing a great job in scripting. Appreciate that you are sharing your knowledge. I have a quick question on TOS scripting.
Here is the part of my code.
def signal = If(IsNaN(HBar), 0,
If(spike = HBar, 1, 0)));
Plot myhigh = if (signal == 1, high, 0);
Plot mylow = if (signal == 1, low, 0);
I am trying to get the High and Low of the signal bar. Unfortunately, due to tos scripting, it is overwriting the values. Is there anyway, we can just get the high and low of the signal bar without overwriting when we pass through the following non-signal bars.
Thanks in advance.
November 12, 2012 at 4:03 pm
Yes, you use rec statements like this:
Rec myhigh= if signal==1 then high else myhigh[1]; Rec mylow= if signal==1 then low else mylow[1];
On Nov 12, 2012, at 2:27 PM, Read the Prospectus