NexusFi: Find Your Edge


Home Menu

 





Thinkscript library, popular scripts and studies


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one lukeskywalker1 with 22 posts (13 thanks)
    2. looks_two wldman with 3 posts (0 thanks)
    3. looks_3 futs with 1 posts (0 thanks)
    4. looks_4 GJStrader with 1 posts (0 thanks)
    1. trending_up 33,232 views
    2. thumb_up 15 thanks given
    3. group 17 followers
    1. forum 28 posts
    2. attach_file 18 attachments




 
Search this Thread

Thinkscript library, popular scripts and studies

  #1 (permalink)
 
lukeskywalker1's Avatar
 lukeskywalker1 
Los Angeles (CA)
 
Experience: Master
Platform: ThinkOrSwim
Trading: Currency Future, Stocks
Posts: 34 since Apr 2019
Thanks Given: 1
Thanks Received: 40

Hi guys. A lot of useful scripts have accumulated. I want to share in this thread.

First script is HIGH, LOW, OPEN, CLOSE – SUPPORT AND RESISTANCE LINE
The indicator will draw levels Opening, Close, High, and Low of a current and previous day on the chart.

 
Code
#thinkscript indicator : OCHLO_levels

#It draws yesterday High, Low, Open, Close support and resistance line

#by thetrader.top

 

input sPeroid = {default DAY, WEEK, MONTH};

input iHigh = {default “yes”, “no”};

input iLow = {default “yes”, “no”};

input iClose = {default “yes”, “no”};

input iOpen = {default “yes”, “no”};

input iTodayOpen = {default “yes”, “no”};

plot pHigh = if !iHigh then high(period = sPeroid)[1] else Double.NaN;

plot pLow = if !iLow then low(period = sPeroid)[1] else Double.NaN;

plot pClose = if !iClose then close(period = sPeroid)[1] else Double.NaN;

plot pOpen = if !iOpen then open(period = sPeroid)[1] else Double.NaN;

plot pTodayOpen = if !iTodayOpen then open(period = sPeroid)[0] else Double.NaN;

 

pHigh.SetDefaultColor (Color.GREEN);

pHigh.SetPaintingStrategy(PaintingStrategy.DASHES);

pLow.SetDefaultColor(Color.RED);

pLow.SetPaintingStrategy(PaintingStrategy.DASHES);

pClose.SetDefaultColor (Color.GRAY);

pClose.SetPaintingStrategy(PaintingStrategy.DASHES);

pOpen.SetDefaultColor (Color.WHITE);

pOpen.SetPaintingStrategy(PaintingStrategy.DASHES);

pTodayOpen.SetDefaultColor (Color.WHITE);

pTodayOpen.SetPaintingStrategy(PaintingStrategy.DASHES);

Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
How to apply profiles
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #2 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,512 since Aug 2011
Thanks Given: 2,047
Thanks Received: 9,513

for starting this thread. I will be watching with interest.

-Dan

Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,512 since Aug 2011
Thanks Given: 2,047
Thanks Received: 9,513


Two of us use ToS and care about script ideas.

-Dan

Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
 
casey44's Avatar
 casey44 
Louisville KY
 
Experience: Beginner
Platform: NT8
Trading: micros
Frequency: Daily
Duration: Minutes
Posts: 247 since Jan 2010
Thanks Given: 4,051
Thanks Received: 311

@wldman
Not used TOS in long time but once heard good comments about this site:
https://thinkscripter.com/community/index.php

Some info about founder Eric Purdy from google, don't know if he's now with Simpler Trading. https://www.simplertrading.com/product/introduction-to-thinkscript-vol-i-ii-iii/

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #5 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,512 since Aug 2011
Thanks Given: 2,047
Thanks Received: 9,513

@casey44

Visit my NexusFi Trade Journal Reply With Quote
  #6 (permalink)
 
lukeskywalker1's Avatar
 lukeskywalker1 
Los Angeles (CA)
 
Experience: Master
Platform: ThinkOrSwim
Trading: Currency Future, Stocks
Posts: 34 since Apr 2019
Thanks Given: 1
Thanks Received: 40

The indicator shows us the "Outside Bar" pattern.
It will be shown on any timeframe but I recommend looking at the daytime period. You will see a certain number of signals on the chart.

 
Code
#thinkscript indicator: Outside_Bar.
#It shows the "Outside Bar" pattern
#by thetrader.top

def bSignalDown=open[1]<close[1]and high>high[1] and close<low[1] or open[1]>close[1] and high>high[1] and close<low[1];
def bSignalUp = open[1]>close[1] and low<low[1] and close>high[1] or open[1]<close[1] and low<low[1] and close>high[1];
plot down = if bSignalDown then high else double.NaN;
plot up = if bSignalUp then high else double.NaN;
up.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_up);
down.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_down);
up.setDefaultColor(color.LIGHT_green);
down.setDefaultColor(color.LIGHT_red);

Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #7 (permalink)
 
lukeskywalker1's Avatar
 lukeskywalker1 
Los Angeles (CA)
 
Experience: Master
Platform: ThinkOrSwim
Trading: Currency Future, Stocks
Posts: 34 since Apr 2019
Thanks Given: 1
Thanks Received: 40

The "Inside Bar" candlestick pattern is shown with arrows when the candlestick pattern is formed in the chart. An Inside Bar is formed when price trades within the high and low range of the previous day, making the candle an inside day or an inside bar. The inside bar is therefore a two candlestick price pattern. An inside bar is also similar to a bullish or a bearish harami candlestick pattern.

⚙Install the indicator in Thinkorswim. There are no special settings, but you can set the color of the arrows, size and so on.
_______________________________________
HTML Code:
#thinkscript indicator:Inside_Bar.
#Shows the pattern “Inside Bar”
#by thetrader.top

def bSignalDown = open[1]>close[1] and open<close and high<high[1] and low>low[1];
def bSignalUp = open[1]<close[1] and open>close and high<high[1] and low>low[1];
plot down = if bSignalDown then high else double.NaN;
plot up = if bSignalUp then high else double.NaN;
up.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_up);
down.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_down);
up.setDefaultColor(color.LIGHT_green);
down.setDefaultColor(color.LIGHT_red);

Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #8 (permalink)
GJStrader
St Louis, MO
 
Posts: 12 since Jun 2019
Thanks Given: 5
Thanks Received: 12

simple up-volume : down-volume text bubble for NYSE and NASDAQ to show values on charts...

#up-volume down-volume text bubble

input ShowZeroLine = yes;
input market = {default NYSE, NASDAQ};

def UVOL = close(“$UVOL”);
def DVOL = close(“$DVOL”);
def UVOLQ = close(“$UVOL/Q”);
def DVOLQ = close(“$DVOL/Q”);

#NYSE Breadth ratio
def NYSEratio = (UVOL / DVOL);
AddLabel(yes, Concat(Round(NYSEratio, 2), ” :1 NYSE UpVolownVol”), (if NYSEratio > 1 then Color.GREEN else Color.RED));

#Nasdaq Breadth ratio
def NASDratio = (UVOLQ / DVOLQ);
AddLabel(yes, Concat(Round(NASDratio, 2), ” :1 NASD UpVolownVol”), (if NASDratio > 1 then Color.GREEN else Color.RED));

Reply With Quote
  #9 (permalink)
 futs 
Clearwater FL US
 
Experience: Beginner
Platform: Etrade, Tradovate and TOS
Trading: SPX, /ES, /MES, Options
Posts: 35 since Jan 2019
Thanks Given: 24
Thanks Received: 20

https://b.link/tSCommunity

Its maintained by a scripter that hangs out in the thinkscript lounge on TOS.

Reply With Quote
  #10 (permalink)
 
lukeskywalker1's Avatar
 lukeskywalker1 
Los Angeles (CA)
 
Experience: Master
Platform: ThinkOrSwim
Trading: Currency Future, Stocks
Posts: 34 since Apr 2019
Thanks Given: 1
Thanks Received: 40


The Double Outside Bar candlestick pattern shows signals on the chart with arrows at the moment when such pattern is formed. The signal is very rare.

⚙First, import indicator by using <Edit Studies> menu. It will appear on the list, but you cannot see it right away.You need to enter Studies – User Defined. Click on the necessary indicator and add - "Add Study". There are no special settings for this indicator.
_______________
HTML Code:
#thinkscript indicator: Double_Outside_bar.
#Shows the pattern "Double Outside bar."
#by thetrader.top

def bSignalDown = 0;
def bSignalUp = high[2]<high[1] and high[1]<high and low[2]>low[1] and low[1]>low;
plot down = if bSignalDown then high else double.NaN;
plot up = if bSignalUp then high else double.NaN;
up.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_up);
down.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_down);
up.setDefaultColor(color.LIGHT_green);
down.setDefaultColor(color.LIGHT_red);


Visit my NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on September 6, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts