On this page
Overview
One of the most useful (and underrated) features in ThinkOrSwim is the ability to load custom scripts that other people have written. Imported studies, shared workspaces, and code pasted from the web let you extend the platform far past what the default install gives you. This tutorial covers all three methods: importing a study from a shared link, sharing your own studies and workspaces, and pasting raw ThinkScript code from a website. By the end you will know exactly which method to use and how to get the code into ThinkOrSwim in under a minute.
The Three Ways to Load Custom Code into ThinkOrSwim
Before we get into the steps, it helps to know which method fits which situation.
Method 1: Import a shared link. Someone sends you an http://tos.mx/...-style link. You paste it into ThinkOrSwim and the study installs itself. Easiest and most common.
Method 2: Share a workspace. A workspace bundles your entire layout: charts, scans, watchlists, sidebar panels, all of it. Useful when you are moving between computers or when someone wants your exact setup, not just one indicator.
Method 3: Paste raw code from the web. You found a ThinkScript snippet on a forum or site like usethinkscript.com and want to drop it into your platform manually. Three more clicks than Method 1.
We will walk through all three.
Method 3: Paste Raw ThinkScript Code from a Website
Plenty of useful scripts live on community sites and forums as plain code, not shared links. Here is how to get one of those into ThinkOrSwim.
Step 1: Find and Copy the Code
Search Google for what you want. For example, if you trade futures and want a study that tells you the notional value of each contract, search "thinkscript futures notional value." Sites like usethinkscript.com usually have a clean code block you can copy. Highlight the entire block and copy it.
Step 2: Create a New Study in ThinkOrSwim
Click the studies icon in the upper-right of your chart panel, then click Create in the lower-left of the dialog. The code editor opens with a single placeholder line: plot Data = close;.
Step 3: Paste the Code
Delete the placeholder line. Click into the empty editor, right-click, and paste. Your code now sits in the editor.
Step 4: Name and Save
At the top of the dialog, give the study a name you will remember. Something like Futures_Notional_Value beats the default. Click OK in the lower-right.
Step 5: Add It to a Chart
Same as Method 1: click the studies icon again, search for the name you just gave it, select it, click Add selected, then OK. Pull up a relevant chart (a futures contract like ES, in our example) and verify the study is calculating correctly.
Why This Matters
Once you are comfortable importing scripts, your platform stops being limited by what TD Ameritrade ships out of the box. You can:
- Add specialized studies built by traders who solved a problem you have.
- Move your full setup between machines without rebuilding it from scratch.
- Test community scripts in seconds before deciding whether to keep them.
- Share your own work with a single link instead of copy-pasting blocks of code.
If you have downloaded any of our free indicators, this same import flow is exactly how you install them. Each one ships as a shared link or a .ts file, and the same five clicks work for all of them.
Full thinkScript code
Create a free account or sign in to copy all 17 lines and download the file.
Download
Download the How to Import a Study into ThinkOrSwim Indicator for ThinkOrSwim. The download contains a STUDY.ts file, which you can directly import into your ThinkOrSwim platform.
Video: How to Import a thinkScript Study into ThinkOrSwim, built line by line
9 mins on YouTube.
Watch on YouTube
Questions
How do I import a ThinkScript study into ThinkOrSwim?
Open ThinkOrSwim, click the Setup menu in the upper-right, and select Open shared item. Paste the shared link (it will look like http://tos.mx/...), click Preview, then Import. The study is now in your library and can be added to any chart from the studies dialog.
Where do I paste raw ThinkScript code?
Open the studies dialog from the chart panel, click Create in the lower-left, delete the placeholder line in the editor, then paste your code. Give the study a memorable name and click OK. The new study will be searchable from the studies list.
Can I share my entire ThinkOrSwim workspace, not just one study?
Yes. Click Setup in the upper-right and select Share workspace. ThinkOrSwim generates a link that captures every panel, chart, watchlist, and custom study in your current layout. Anyone who imports it gets your exact setup. Many traders email the link to themselves so they can restore their full platform on a new computer.
My imported study is not showing up on the chart. Why?
Importing only adds the study to your library. To display it, click the studies icon on the chart, search for the study by name in the left-side search box, select it, click Add selected, then OK. If the name is something generic like ThinkScript Study for May 12, renaming it during import makes it easier to find.
Where can I find ThinkScript code to import?
Community sites like usethinkscript.com publish hundreds of free scripts as plain code. Search Google for what you want (for example, thinkscript futures notional value), copy the code block, and paste it into a new study in ThinkOrSwim. Our own indicator library at tosindicators.com/indicators ships every download as either a shared link or a .ts file, both of which work with the import flow above.
Get each new indicator by email
One email on Sundays with the week's new tool and its code. A free account also unlocks every .txt download.
No credit card. Unsubscribe anytime.
Fair Value Gap
False Breakout Scanner
Heiken Ashi Trend



Stock Volatility Box
Futures Volatility Box
ORB Setups
Squeeze Setups
How to Fix Bugs in thinkScript Code
How to Set Custom Hours in thinkScript
Aggregation Periods - How to Plot Larger Time Frame Indicators on Smaller Time Frames
Maximize Your Chart Space With This Simple Trick
Custom Toolbars - Instantly 10x Your Productivity
How to Track Percent Change From Open