Posted on

How to Install ThinkOrSwim Indicators, Studies, Scans, Columns & Strategies

Install ThinkOrSwim Indicators

ThinkOrSwim is a great platform, but let’s face it: some things are just plain confusing. Luckily, some of us have already been through the trial and error and know how to do a lot of the stuff you want to know how to do. So in this tutorial, I’ll go through a few of those things. In particular, I’m going to teach you how to install ThinkOrSwim indicators and other thinkScripts.

There are actually 4 methods for installing thinkScripts.

  1. Clicking the sharing links
  2. Copying and pasting the sharing links manually
  3. Importing the source files manually (files ending in STUDY.ts or STRATEGY.ts)
  4. Copying and pasting the code in manually

We’ll go through each on in it’s turn. I’ve also included a video below that will walk you through each and every method except the first one, since it’s pretty easy.

How to Find Your ThinkOrSwim Import Links

If you’ve just purchased an indicator on our site, all your links will in the My Account section under Orders. First, mouse over the “My Account” menu item at the top right of the page, then click “Orders” in the drop-down menu:

finding your thinkorswim links

On the next page, you’ll see all your orders. Click the one you’re interested in viewing the links for:

thinkorswim orders page

When your order details page pops up, you’ll see your import links below, as well as your file downloads should you want them later:

thinkorswim order details with sharing links

Now that you have your import links, it’s time to go through the actual installation process.

Method 1: Clicking the ThinkOrSwim Sharing Links

This method is pretty easy and straight-forward. Or so you would think anyway. Each ThinkScript can be shared with its own unique “” sharing link. Clicking one of these links will take you to a page on ThinkOrSwim’s website where you can confirm what the script is. The page looks like this:

install thinkorswim indicators with sharing links, confirmation page

Then if you approve, you can click the green confirmation button (the one that says “Scan now in thinkorswim”). The file should be automatically imported into your TOS application.

I say should because it doesn’t work on all systems. Specifically those where TOS isn’t installed for all users. For those lucky traders, the green button will ask you to reinstall TOS. But if you don’t want to do that, no problem! You’ll just need to skip to method two below.

Method 2: Copying & Pasting the TOS Sharing Links

If the automatic link method above doesn’t seem to work, don’t fret. Just go into your ThinkOrSwim application, and click the “Setup” menu in the top right corner (gear icon). In the dropdown menu that appears, click “Open shared item”.

install thinkorswim indicators by copying sharing links step 1

Then a a box will pop up, and you can simply copy and paste the link into the space that says “Shared item URL”. You have to go through this process one link at a time unfortunately. After you paste in the link, click “Preview”:

install thinkorswim indicators by copying sharing links step 2

The program will load the link into memory and grab the name so you’ll know for sure what you’re importing. If everything looks good, then click “Open”:

install thinkorswim indicators by copying sharing links step 3

A confirmation dialog box will pop up telling you the script has been imported and given a machine-generated name. Click “Rename” to change the name to something that will be easy for you to find in an alphabetical list later:

how to install thinkorswim indicators by copying sharing links step 4

Remember to give it an easy to remember name, but something unique as well:

install thinkorswim indicators by copying sharing links step 5

Voila! You’re done. The script has been imported and saved under your chosen name. See the end of this post for instructions on how to load and use each of the scripts you’ve just imported.

Method 3: Importing a Source File Manually

You shouldn’t need to mess with source files… that’s why ThinkOrSwim created the sharing links mentioned above. The source code downloads we provide on this site are just for backup purposes in case you misplace your links. All the thinkScripts on this site can be installed automatically through the sharing links, and you probably won’t need the download file at all. But the file is there in case you lose your confirmation email or if you have trouble with the sharing links.

To import your source files directly, you may first need to UnZip them. Most of the time we have to provide them as compressed ZIP files. To open them, if you don’t already have a ZIP application installed on your computer, you might give 7Zip a try. You can also try any of a number of free ZIP applications out there by searching Google for “free unzip program” or “unzip files online”.

After you unzip the files, you should be left with files whose names end with either STUDY.ts or STRATEGY.ts. Go to ThinkOrSwim Charts and click Studies > Edit Studies. In the new window, make sure you’re on the right tab for either Studies or Strategies, then click “Import” below. In the next window, navigate to the file on your hard drive, select it, and click open:

import a study or strategy from file

Note: Only studies and strategies can be imported from source files. Columns and scans have to be imported with links, or the actual code text has to be selected and pasted over into TOS manually. If you received a .txt file instead of a STUDY.ts or STRATEGY.ts file, then you need to open that file up and manually copy and paste the code over using the next method.

Method 4: Copying and pasting the code in manually

And as a last resort, you can even copy and paste the code over manually. This is only really necessary for columns and scans when the sharing links don’t work. You really shouldn’t have to do it this way! But in case you want to, here is how to add a custom watchlist column:

Copy text into column in ThinkOrSwim

And here is how to copy and paste code and make a custom scanner rule:

past code into thinkorswim scanner

Done Installing!

You’re done! You’re officially a nerd like me now!

Now that you’ve figured out how to get the code into ThinkOrSwim, it’s time to actually activate the code and start using it. Here’s a brief rundown of how to find and activate thinkScripts that you’ve recently imported into ThinkOrSwim…

How To Load a Chart Study, Indicator, or Strategy

If you were importing a chart study or indicator, or a strategy, then you just need to go to charts > studies > edit studies, and search for the script name in the list. Then double-click to add it to the chart (or click “Add Selected” below), and then click OK to apply the changes:

add a thinkorswim study or strategy to chart

How To Load a StockHacker Scan

If the link you just imported was a scan, a window will pop up with the scanner rules ready-to-go. Just click scan and watch it work. You might have to resize and expand the window to see the results. Or you can close that popup and load the scan in your main window as well. You can access your scans at any time from the dark gray menu on the top right:

how to load a thinkorswim stockhacker scan query

How to Load a Custom Quote or Watchlist Column

If you just imported a column thinkScript, there are a couple of ways to activate and use it. You can use columns in the MarketWatch Quotes tab, or in the StockHacker or OptionsHacker scan tabs, or on a sidebar watchlist on the left hand side of the window. In either case, you’ll first right-click anywhere on the column headers and select “Customize…”

add a watchlist quote column step 1

A window pops open with a list of columns you can add. Just find the column name in the alphabetical list, and double-click to add it to the right hand side. Then click OK:

add a watchlist quote column step 2

The column will now appear on your quote screen (whichever column header you had originally right-clicked on):

add a watchlist quote column step 3


That should just about do it. Now you should have all your scans, strategies, columns, and studies/indicators imported and installed. Not only that, but if you went through the second part of the tutorial, you should have the thinkScripts added to your screens and ready to roll.

If you find you’re still unsure of how to do something, check out my video. I walk through almost all of these methods on the screen for you, and it should help you figure out anything you missed:


If you have any questions or issues, please post a comment below!

Posted on

How to Program Custom Trading Strategies in ThinkOrSwim

how to backtest Custom Trading Strategies in thinkorswim

How to Program Custom Trading Strategies in ThinkOrSwim

I’ve had several questions about ThinkOrSwim strategies, so I wanted to do a post on how to program custom trading strategies in ThinkOrSwim. Since I’ve been programming a lot of strategies lately myself, yesterday I decided to do a video for the official YouTube channel where I go through the process of creating and testing a new, built-from-scratch strategy in ThinkOrSwim. It shows where to go to create and edit strategies, how to add and reference indicators, how to add user-customizable inputs, and then how to implement the strategy and backtest it on a specific chart.

It’s really important to quantify and monitor your trading edge, whether you’re trading discretionary setups or mechanical systems. ThinkOrSwim allows you to test strategies in mechanical form, which can later be applied to either discretionary or automated trading systems. You can take the edges you identify quantitatively with ThinkOrSwim, and apply them to a discretionary trading strategy that takes advantage of even more precise entries and exits than what an automated system might provide. And I think, one way or another, whether edges are manually identified over time through trial and error and detailed journaling, or automatically identified with systemized backtesting, quantitative edges are an essential part of all types of trading.

So with that in mind, here’s my most recent video on how to program custom trading strategies in ThinkOrSwim and run backtests on them: