How to import existing thinkScript code on ThinkorSwim

BenTen

Administrative
Staff member
Staff
VIP
If somebody shared with you a block of code to use on ThinkorSwim, most likely that's a thinkScript code. This means you will have to import it manually into ThinkorSwim in order for it to turn into an actual indicator.

For beginners, importing some plain code into a software is difficult. This tutorial should walk you through that process.

How to Import thinkScript code in ThinkorSwim platform

  • 1. Launch ThinkorSwim from your computer
  • 2. Click on Studies (should be near the top right hand corner)
  • 3. Edit Studies > Create
  • 4. Give your indicator a name
  • 5. Copy and paste the thinkScipt code into the thinkScript Editor
  • 6. Click Ok
  • 7. Click Apply
And now from a simple block of code, you just turn it into an indicator.

Some screenshots just in case you need extra assistance.

C8Xu4gr.png


S88KljI.png


HCIBpo1.png
 
Last edited:

markos

Well-known member
VIP
I go to the suggested indicators but all is see is coding and no url to put into think or swim
@natetorres99

Welcome to use thinkscript! If you are new to trading, please read through our very comprehensive Tutorials. Also, at the top of your thinkorswim program there is a tab called Education. Please read that over and watch the videos. Reading is essential!
It is very important that you learn to walk before you can run.

When you are on TOS, please use PAPERMoney for a number of years. Focus on one concept at a time.
If you are going to jump into the deep end of the pool, please be sure you fully understand the concepts. This is the ultimate video game but it can be very dangerous for even the most experienced trader. You will generally be better off saving code to a program called Notepad++ to keep your codes in. (Free Download)

The links are nice, but they expire and if you put a link in for a Market Watch Column, you can't ever delete it.
 

sniktau

New member
As chance would have it, I made a gif to help some friends. Probably redundant but some people like movies!

E7afsT1.gif
 

AlphaWCX

New member
I have successfully pasted code, but am struggling when I import a thinkscript. I followed the video, yet when I hit "Import" I cannot figure out where to find the Thinkscript.
 

BenTen

Administrative
Staff member
Staff
VIP
@AlphaWCX There should be a popup right after telling you what the imported script is being saved under. If you go to the User Defined section in your ThinkorSwim, you should be able to find it.

zCuUfH2.png
 

Mattyb740

Member
How do you copy/paste code that from this site into TOS and it be successful...? I have looked and looked on this site and searched keywords trying to find the step-by-step process into how to do this, but I still have not found it. I know ppl have posted it in threads, but I can't find those either. please help lol
Thanks in advance!
 

MerryDay

Administrative
Staff member
Staff
VIP
Lifetime

Mattyb740

Member
If somebody shared with you a block of code to use on ThinkorSwim, most likely that's a thinkScript code. This means you will have to import it manually into ThinkorSwim in order for it to turn into an actual indicator.

For beginners, importing some plain code into a software is difficult. This tutorial should walk you through that process.

How to Import thinkScript code in ThinkorSwim platform

  • 1. Launch ThinkorSwim from your computer
  • 2. Click on Studies (should be near the top right hand corner)
  • 3. Edit Studies > Create
  • 4. Give your indicator a name
  • 5. Copy and paste the thinkScipt code into the thinkScript Editor
  • 6. Click Ok
  • 7. Click Apply
And now from a simple block of code, you just turn it into an indicator.

Some screenshots just in case you need extra assistance.

C8Xu4gr.png


S88KljI.png


HCIBpo1.png
what about if you are wanting to import code for scanners/watchlists ? dp you have step by step for that as well?
 

Mattyb740

Member
@Mattyb740
Scan studies are imported into the studies tab in the same manner as indicator studies but no they are not added to your chart.
You go to the scan tab and select the study there.
So if the code is for a scan or watchlist, I would go to studies-create-paste the same way I did for an indicator study for price action ?
Then I go to watchlists -personal and the study is there, or scan tab-load scan ?
 

MerryDay

Administrative
Staff member
Staff
VIP
Lifetime
So if the code is for a scan or watchlist, I would go to studies-create-paste the same way I did for an indicator study for price action ?
Then I go to watchlists -personal and the study is there, or scan tab-load scan ?
For scans, yes you go to studies-create-paste the same way I did for an indicator study. Then you go in scan hacker and click on the script you created.

For watchlists:
https://usethinkscript.com/threads/...ll-put-options-signal.3989/page-16#post-72334
 

Mattyb740

Member
For scans, yes you go to studies-create-paste the same way I did for an indicator study. Then you go in scan hacker and click on the script you created.

For watchlists:
https://usethinkscript.com/threads/...ll-put-options-signal.3989/page-16#post-72334
ok, i apologize for not getting this!! BUT i did what you said in earlier post and created this watchlist column code in study-create but it did not show up in the watchlist column i looked at the link you posted above and i need a step by step from when you first open tos to create watchlists scans /watchlist column code. Thanks in advance


input length = 14;
input calcLength = 5;
input smoothLength = 3;

def o = open;
def c = close;
def data = fold i = 0 to length
with s
do s + (if c > getValue(o, i)
then 1
else if c < getValue(o, i)
then - 1
else 0);
def EMA5 = ExpAverage(data, calcLength);
def Main = ExpAverage(EMA5, smoothLength);
def Signal = ExpAverage(Main, smoothLength);
plot isTrue = if Main > Signal then 1 else 0;
AssignBackgroundColor(if Main > Signal
then color.green
else color.red)
 

MerryDay

Administrative
Staff member
Staff
VIP
Lifetime
ok, i apologize for not getting this!! BUT i did what you said in earlier post and created this watchlist column code in study-create but it did not show up in the watchlist column i looked at the link you posted above and i need a step by step from when you first open tos to create watchlists scans /watchlist column code. Thanks in advance


input length = 14;
input calcLength = 5;
input smoothLength = 3;

def o = open;
def c = close;
def data = fold i = 0 to length
with s
do s + (if c > getValue(o, i)
then 1
else if c < getValue(o, i)
then - 1
else 0);
def EMA5 = ExpAverage(data, calcLength);
def Main = ExpAverage(EMA5, smoothLength);
def Signal = ExpAverage(Main, smoothLength);
plot isTrue = if Main > Signal then 1 else 0;
AssignBackgroundColor(if Main > Signal
then color.green
else color.red)
https://usethinkscript.com/threads/...hlist-column-a-tutorial-for-thinkorswim.9709/
 

AngryBeavers

New member
For scans, yes you go to studies-create-paste the same way I did for an indicator study. Then you go in scan hacker and click on the script you created.

For watchlists:
https://usethinkscript.com/threads/...ll-put-options-signal.3989/page-16#post-72334
Hi @MerryDay can you help me please understand this:

If I copy and paste a script and save it as a study for example as: IronRodSMIhistogram..
If someone made a separate script for a scan for "IronRodSMIhistogram" what would I save the scan's name in order for that scan to work and recognize the saved script? Thanks in advance.
 
Last edited:

Similar threads

Top