Three ways to load custom code into ThinkOrSwim: import a shared study link, share a full workspace, and paste raw ThinkScript from the web.
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.
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.
This is the workflow you will use most often. Whether the link comes from a friend, a Discord, or a free-download page, the steps are the same.
Get the link onto your clipboard. It will look something like http://tos.mx/abc123. Email, text, Messenger, Discord, anywhere is fine, as long as you can copy it.
Inside ThinkOrSwim, click the Setup menu in the upper-right corner. In the dropdown, select Open shared item.
A small dialog opens with a black entry box and an example URL beneath it. Click into the box and paste your link. Hit Preview on the right. ThinkOrSwim shows you what is about to be imported, including the name the original author gave the study.
If the auto-generated name is something generic like “ThinkScript Study for May 12,” rename it to something you will recognize later. Then click Import. ThinkOrSwim confirms the import with a small notification.
Click the studies icon at the top of the chart panel. In the search box on the left, start typing the name of the study you just imported. It will appear in the results. Select it, click Add selected, then OK. The study is now active on your chart.
Sometimes you are on the other side: you have a custom study or a finely-tuned workspace and you want to send it to someone else (or to yourself, on another computer).
Click the studies icon, find your custom study in the list on the left, and right-click it. In the dropdown, select Share. A dialog appears with a default name (usually the date). Rename it if you want, then click Share.
A small popup at the top of the screen shows the generated link. It disappears quickly, but do not panic. The link is already on your clipboard. Paste it into an email, message, or wherever you need it.
Workspaces capture your entire platform layout: the sidebar panels, watchlists, news feed, custom chart studies, every tweak you have made to the default install. To share one, open the Setup menu in the upper-right and click Share workspace.
Same flow as a study share: a dialog appears with a default name, you can rename it, then click Share. The link lands on your clipboard automatically.
If you ever switch computers or need access to your setup on the road, this is gold. Personally, I email a workspace link to myself. To load it, paste the link into Setup > Open shared item, hit Preview, then Import. To activate it, click Setup again and the new workspace will be listed at the bottom of the menu. Click it, confirm, and your platform is identical to wherever you saved it from.
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.
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.
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;.
Delete the placeholder line. Click into the empty editor, right-click, and paste. Your code now sits in the editor.
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.
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.
Once you are comfortable importing scripts, your platform stops being limited by what TD Ameritrade ships out of the box. You can:
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.
# Futures_Notional_Value
# Sample script referenced in the tutorial.
# Paste this into a new study (Studies > Create) to see
# tick size, tick value, and one-lot share count for any
# futures contract on your chart.
declare lower;
def TickSize = TickSize();
def TickValue = TickValue();
def OneLot = TickValue / TickSize;
AddLabel(yes, “Tick Size: ” + AsText(TickSize), Color.WHITE);
AddLabel(yes, “Tick Value: $” + AsText(TickValue), Color.GREEN);
AddLabel(yes, “1 Lot = ” + AsText(OneLot) + ” shares”, Color.YELLOW);
# END – Futures_Notional_ValueWant the .ts file and the one-click import? Both come with a free account.
Useful next steps after you have the import workflow down:
Join 40,000+ traders using institutional-grade tools for ThinkOrSwim.
Get the Bundle