The Universe of ThinkScript - Your One Stop Research Shop!

markos

Well-known member
VIP
This OneNote is a labor of love from JohnnyQuotron (JQ) of ThinkorSwim's thinkScript Lounge (TSL). To find the Lounge (TSL), Click Support/Chat in the upper right of the desktop. Click Chat Rooms and go down to thinkScript Lounge. The lounge is staffed by volunteers, not employees, who enjoy programming.

The Universe of ThinkScript - Your Main Source for TOS & ThinkScript Research
(Originally shared here by member, Thomas. Somethin' happened and repost was required)

Please Note: This is reference material only, no suggestion of action is implied!

The link to the thinkScript Community OneNote is:
These are new working links to the OneNote archive -
https://tinyurl.com/thinkScriptLoungeChatArchive
https://tinyurl.com/thinkScriptLoungeScriptArchive

Once you open the community OneNote by clicking the link here is what you will find:

A. The Welcome tab, which contains brief notes and tools along with a Search Guide

B. theManual tab, located here are links to the learning center:

http://tlc.thinkorswim.com/center/howToTos/thinkManual.html
http://tlc.thinkorswim.com/center/reference/thinkScript.html
http://tlc.thinkorswim.com/center/howToTos/tutorials.html

C. LoungeWisdom, where you will find the following:
01. Lounge Archive - Practically every word ever written in the TSL since January 2018.

02. Education, which includes Snippets of code and information like clouds, color, columns, Combined Signal Algorithms and a boatload more. Here also is the thinkscript "Bible" that some on the trade desk will refer to: The StanL Snippets.

03. Technical Analysis, here you will find scripts on Trend, Momentum, S/R, VOL, Volume etc

04. Multiple Indicators and Scripts

05. ORB - Opening Range Breakout scripts and information.

Numbers 06 through 13 are full of items like Fundamentals, Candles, Options, Futures, Forex, Chart Set-ups etc.

14. Here is JQ's workshop, inside there is a tab for other notebooks; UpD Creeks OneNote and Duncan's OneNote, which are his notes from a Tasty Trade Options Meetup Group.

15. Vendors of different scripts

16. Books and Authors, even here there is a lot of Material from many wise Traders and Investors.

If you have read this far, congratulations, you are not only serious but inquisitive which is a very good thing.

Note: Obsolete section below removed by a senile old man...
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Thank you @markos for putting this together. My fault for deleting the original Universe of thinkScript post. 😩
 
This is a treasure. Thanks so much. I've got a scan for stocks with selling climaxes I found but am getting an error message when trying to enter it.

Here's the code

Code:
SimpleMovingAvg("length" = 20) is greater than or equal to 10
 
SimpleMovingAvg("price" = VOLUME, "length" = 20) is greater than or equal to 40000
 
SimpleMovingAvg("price" = VOLUME, "length" = 2) is greater than SimpleMovingAvg("price" =  
VOLUME, "length" = 250)*2
 
BollingerBandwidth("length" = 10)."Bandwidth" is greater than 
simpleMovingAvg("price" = bollingerBandwidth ("length" = 10)."bandwidth", "length" = 250)*2
 
Lowest(RSIWilder( 14 )."RSI", 5) is less than 25

When I tried to paste it everything turned red except the first line so I'm not sure what the problem is. Thanks

StochasticFast("k period" = 14)."FastK" is less than 10
 
Thank you @markos for putting this together. My fault for deleting the original Universe of thinkScript post. 😩

Hey Ben,

Do you have a Stoch Divergence Script like this?

Also, one that identifies price channels and trendlines that is static and doesn't disappear after price moves?
 
This is a treasure. Thanks so much. I've got a scan for stocks with selling climaxes I found but am getting an error message when trying to enter it.
Here's the code
Code:
 SEE ABOVE
When I tried to paste it everything turned red except the first line so I'm not sure what the problem is. Thanks
StochasticFast("k period" = 14)."FastK" is less than 10

Several issues: Always use a plain text file (.txt) using Notepad++ or other text editor, never a Word Processor. The semi-colons are missing at the end of each code line. I don't see "DEF's" anywhere. That scan code you posted was not the complete code. Always post complete code including date and author.
Look for other examples in in the Onenote.
Please read the manual, reference and tutorials to become familiar.
The only way to get better is trial and error.
Keep trying.
 
Several issues: Always use a plain text file (.txt) using Notepad++ or other text editor, never a Word Processor. The semi-colons are missing at the end of each code line. I don't see "DEF's" anywhere. That scan code you posted was not the complete code. Always post complete code including date and author.
Look for other examples in in the Onenote.
Please read the manual, reference and tutorials to become familiar.
The only way to get better is trial and error.
Keep trying.

Just for reference here is what was posted.

http://stockcharts.com/articles/scanning/2014/02/scanning-to-find-stocks-with-selling-climaxes.html

The scan criteria below are designed to find stocks that became oversold on high volume and are still trading near their lows.

SimpleMovingAvg("length" = 20) is greater than or equal to 10

SimpleMovingAvg("price" = VOLUME, "length" = 20) is greater than or equal to 40000

SimpleMovingAvg("price" = VOLUME, "length" = 2) is greater than SimpleMovingAvg("price" =  
VOLUME, "length" = 250)*2

BollingerBandwidth("length" = 10)."Bandwidth" is greater than 
simpleMovingAvg("price" = bollingerBandwidth ("length" = 10)."bandwidth", "length" = 250)*2

Lowest(RSIWilder( 14 )."RSI", 5) is less than 25
StochasticFast("k period" = 14)."FastK" is less than 10

From <https://groups.yahoo.com/neo/groups/TOS_thinkscript/conversations/topics/19164>
 
@tenacity11 This was already worked on by Richard Houser and Waylock in 2014. If they couldn't get you the answer, I can't either. Those people in that thread are Head and Shoulders above my ability.
Please spend the time searching the scripts in the onenote for something comparable.
Read the 200 page StanL script manual.
or - anyone else can jump in here to help out.
 
@tenacity11 This was already worked on by Richard Houser and Waylock in 2014. If they couldn't get you the answer, I can't either. Those people in that thread are Head and Shoulders above my ability.
Please spend the time searching the scripts in the onenote for something comparable.
Read the 200 page StanL script manual.
or - anyone else can jump in here to help out.
Thank You. I'm new to code. I'll keep looking.
 
Thank you markos & ben for informing me about the universe, good to know.
Maybe I am missing the point though, or seriously my brain is not up to speed.
I am suppose to post my request here, because I did not see script that comes close to what I am requesting.
In the past, my job as a mentor was to guide my follow workers, help them with their mistakes or challenges.
I thought this was a place, where I could learn from a mentor, I am wrong?
 
@lee-I-O=coke-A You posted in the right place, the questions forum. Unfortunately, as far as I am able, writing a script like that would take me forever plus one day. And then I would not know if it was correct according to Elliott Wave Theory.
That was my reason for suggesting something more basic. Did you Google SyracusePro + thinkScript? That may be your best bet if you must have that study.

Concerning the last 2 lines on mentorship, I will leave that up to @BenTen to answer.
 
@lee-I-O=coke-A This community is here to help. You posted in the correct place. If anyone has the answer to any of your questions I'm sure they will be more than happy to share. 🍻
 
Hey Ben, Do you have a Stoch Divergence Script like this?
Also, one that identifies price channels and trendlines that is static and doesn't disappear after price moves?

Another person to watch for this indicator is Rayner Teo from Thailand. This guy knows his stuff and is well thought of by many.
NOT an endorement, just info!
How to use Stochastic Indicator like a Pro: When to use, when not to use — and why

 
Last edited by a moderator:

Studies and Strategies implemented by ThinkorSwim to accompany articles in the TASC magazine are organized by date on the following sub-pages.

This is from The Universe of ThinkScript located in the Tutorial Section of useThinkScript.
Thanks go to JohnnyQuotron of the ThinkScript Lounge for curating this great resource for the community to use.
https://tinyurl.com/thinkScriptLoungeScriptArchive
 
Last edited by a moderator:
This OneNote is a labor of love from JohnnyQuotron (JQ) of ThinkorSwim's thinkScript Lounge (TSL). To find the Lounge (TSL), Click Support/Chat in the upper right of the desktop. Click Chat Rooms and go down to thinkScript Lounge. The lounge is staffed by volunteers, not employees, who enjoy programming.

The Universe of ThinkScript - Answers to Burning Questions!
(Originally shared here by member, Thomas. Somethin' happened and repost was required)

Please Note: This is reference material only, no suggestion of action is implied!

The link to the thinkScript Community OneNote is: https://1drv.ms/u/s!AnkeHrrRM_cvgxQTl1xckINYlKhZ

Once you open the community OneNote by clicking the link here is what you will find:

A. The Welcome tab, which contains brief notes and tools along with a Search Guide

B. theManual tab, located here are links to the learning center:

http://tlc.thinkorswim.com/center/howToTos/thinkManual.html
http://tlc.thinkorswim.com/center/reference/thinkScript.html
http://tlc.thinkorswim.com/center/howToTos/tutorials.html

C. LoungeWisdom, where you will find the following:
01. Lounge Archive - Practically every word ever written in the TSL since January 2018.

02. Education, which includes Snippets of code and information like clouds, color, columns, Combined Signal Algorithms and a boatload more. Here also is the thinkscript "Bible" that some on the trade desk will refer to: The StanL Snippets.

03. Technical Analysis, here you will find scripts on Trend, Momentum, S/R, VOL, Volume etc

04. Multiple Indicators and Scripts

05. ORB - Opening Range Breakout scripts and information.

Numbers 06 through 13 are full of items like Fundamentals, Candles, Options, Futures, Forex, Chart Set-ups etc.

14. Here is JQ's workshop, inside there is a tab for other notebooks; UpD Creeks OneNote and Duncan's OneNote, which are his notes from a Tasty Trade Options Meetup Group.

15. Vendors of different scripts

16. Books and Authors, even here there is a lot of Material from many wise Traders and Investors.

If you have read this far, congratulations, you are not only serious but inquisitive which is a very good thing.
Hi Markos,

when i check my chat rooms, all i see are Trader lounge, swim lessons, shadow trader, futures cast and global news. i am not seeing the thinkScriptLounge
 
Hi Markos,
when i check my chat rooms, all i see are Trader lounge, swim lessons, shadow trader, futures cast and global news. i am not seeing the thinkScriptLounge
@gjervis That would be a question for TOS support. Click the button for help at the top of the screen.
 
I call this "thermomixIndicator"

Code:
#Name: ChrisStoplight
#Programmed By: Chris Ball (xxx) on #1/31/09
#Added Choppiness and Squeeze Indicator by Mobius@Thinkscript Lounge
#Added FW_Mobo_Basic
#Modified to add/change indicators
declare lower;
input showlabels = no;
input showclouds = yes;
input rsilength = 5;
def c = close;
def h = high;
def l = low;
def o = open;

#MOMENTUM
input lengthmo = 5;
def Momentum = c - c[lengthmo];
plot mopos = if Momentum >= 0 then 3 else 2;
mopos.SetDefaultColor(Color.GREEN);
plot moneg = if Momentum < 0 then 3 else 2;
moneg.SetDefaultColor(Color.RED);
AddCloud(if showclouds then mopos else Double.NaN, if showclouds then moneg else Double.NaN, Color.GREEN);

#CCI
input lengthcci = 13;
def pricecci = c + l + h;
def linDev = LinDev(pricecci, lengthcci);
def CCI = if linDev == 0 then 0 else (pricecci - Average(pricecci, lengthcci)) / linDev / 0.015;
plot cci1 = if CCI >= 0 then 4 else 3;
cci1.SetDefaultColor(Color.GREEN);
plot cci2 = if CCI < 0 then 4 else 3;
cci2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then cci1 else Double.NaN, if showclouds then cci2 else Double.NaN, Color.GREEN);

#RSI
def rsi = reference RSI(length = rsilength)."RSI";
plot rsi1 = if rsi >= 50 then 5 else 4;
plot rsi2 = if rsi < 50 then 5 else 4;
rsi1.SetDefaultColor(Color.GREEN);
rsi2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then rsi1 else Double.NaN, if showclouds then rsi2 else Double.NaN, color1 = Color.GREEN);

#Bollinger Bands MOBO
input lengthmobo = 10;
input Num_Dev_Dn = -0.8;
input Num_Dev_up = 0.8;

def sDev = StDev(data = c, length = lengthmobo);

def Midmobo = Average(c, length = lengthmobo);
def Lowermobo = Midmobo + Num_Dev_Dn * sDev;
def Uppermobo = Midmobo + Num_Dev_up * sDev;
def upmobo = if upmobo[1] == 0 and c >= Uppermobo then 1 else if upmobo[1] == 1 and c > Lowermobo then 1 else 0;
def upmo = if upmobo and c > Uppermobo then 1 else 0;
def dnmo = if !upmobo and c > Lowermobo then 1 else 0;
plot mobo1 = if upmobo == 1 then 6 else 5;
mobo1.SetDefaultColor(Color.GREEN);
plot mobo2 = if upmobo == 0 then 6 else 5;
mobo2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then mobo1 else Double.NaN, if showclouds then mobo2 else Double.NaN, Color.GREEN);

#Trend
#Choppiness Indicator from Mobius @My Trade with color changes by Lar
#Set ADX & SMA to how you trade
#Indicates Trending or Chop along with current ADX level

def ADXLength = 5; #TOS default 10
input AverageType = AverageType.HULL;
def AvgLength = 5; #TOS default 8
def Lengthchop = 8;
def Signal = 3;
def Choppy = 61.8;
def MidLine = 50;
def Trending = 38.2;


def ADX = Round(reference ADX(length = ADXLength), 0);
def AVG = MovingAverage(AverageType = AverageType, c, AvgLength);
def CIB = ((Log(Sum(TrueRange(h, c, l), Lengthchop) /
(Highest(if h >= c[1] then h else
c[1], Lengthchop) -
Lowest( if l <= c[1] then l else c[1], Lengthchop)))
/ Log(10)) / (Log(Lengthchop) / Log(10))) * 100;
def CI = CIB;

#Choppiness/Trend Indicator
plot chop = if CI > MidLine then 7 else 6;
chop.SetDefaultColor(Color.YELLOW);
plot trend1 = if CI < MidLine and c > AVG then 7 else 6;
trend1.SetDefaultColor(Color.GREEN);
plot trend2 = if CI < MidLine and c < AVG then 7 else 6;
trend2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then chop else Double.NaN, if showclouds then trend1 else Double.NaN, Color.YELLOW, Color.GREEN);
AddCloud(if showclouds then chop else Double.NaN, if showclouds then trend2 else Double.NaN, Color.YELLOW, Color.RED);

#Overall
plot uptrend = if mopos == 3 and cci1 == 4 and rsi1 == 5 and mobo1 == 6 then 8 else 7;
uptrend.SetDefaultColor(Color.GREEN);
plot dntrend = if moneg == 3 and cci2 == 4 and rsi2 == 5 and mobo2 == 6 then 8 else 7;
dntrend.SetDefaultColor(Color.RED);
AddCloud(uptrend, dntrend, Color.GREEN, Color.RED);


#Squeeze by Mobius @ My Trade with color mod by Lar
#Look at Cloud Color as a possible indication of direction once squeeze ends
def nK = 1.5;
def nBB = 2.0;
def lengthsqueeze = 20;

def BBHalfWidth = StDev(c, lengthsqueeze);
def KCHalfWidth = nK * Average(TrueRange(h, c, l), lengthsqueeze);
def isSqueezed = nBB * BBHalfWidth / KCHalfWidth < 1;

#Squeeze for Longer Term Trend Indicator

plot BBS_Ind = if isSqueezed then 8.2 else Double.NaN;
BBS_Ind.SetDefaultColor(Color.DARK_ORANGE);
BBS_Ind.SetPaintingStrategy(PaintingStrategy.POINTS);
BBS_Ind.SetLineWeight(2);
BBS_Ind.HideBubble();

#Line Spacer
plot line9 = 9;
line9.SetDefaultColor(Color.DARK_GRAY);

AddLabel(showlabels, "MOMENTUM " + Round(Momentum, 3), if Momentum >= 0 then Color.GREEN else Color.RED);
AddLabel(showlabels, "CCI " + Round(CCI, 0), if CCI >= 0 then Color.GREEN else Color.RED);
AddLabel(showlabels, "RSI " + Round(rsi, 0), if reference RSI(length = rsilength)."RSI" >= 50 then Color.GREEN else Color.RED);
AddLabel(showlabels, if upmobo and upmo then "Mobo Above Upper" else if !upmo and dnmo then "Mobo Below Lower" else "Mobo Inside", if upmobo == 1 then Color.GREEN else Color.RED);
AddLabel(showlabels, if CI > MidLine then "CHOP " + Round(CI, 0) else "TRENDING " + Round(CI, 0), if CI > MidLine then Color.YELLOW else Color.WHITE);
AddLabel(showlabels, "ADX " + ADX, if CI > MidLine then Color.YELLOW else Color.WHITE);
AddLabel(showlabels, if uptrend == 8 then "Trend All Up " else if dntrend == 8 then "Trend All Down " else "Trend Mixed ", if uptrend == 8 then Color.GREEN else if dntrend == 8 then Color.RED else Color.GRAY);
#Count of Periods in consecutive squeeze
#rec count = if isSqueezed then count[1] + 1 else 0;
#AddLabel(yes, if isSqueezed then Concat("Squeeze ", count) else "No Squeeze", Color.DARK_ORANGE);


495f458da3765299f6716b521b0619fc.png
 
Last edited by a moderator:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
297 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top