Double Inside Day Indicator + Scanner for ThinkorSwim

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
Here is an indicator that shows Double Inside Bar setup on the Daily. There will also be a scanner included just in case you want to setup a scanner to quickly look for stocks with double inside bar on the daily timeframe.

All credit goes to Drew Griffith for creating the indicator as well as the scanner for ThinkorSwim.

thinkScript Code

Rich (BB code):
#hint: double inside day - next day look for the price to move big one way or another...
def lo = low;
def hi = high;
def vo = volume;

def s = if (hi[2] >= hi[1] and lo[2] <= lo[1]) and (hi[1] >= hi[0] and lo[1] <= lo[0])
and vo[2] >= vo[1] and vo[1] >= vo then 1 else 0;
plot did = s;
did.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
did.SetLineWeight(3);
did.AssignValueColor(Color.WHITE);

Scanner

Rich (BB code):
#DoubleInsideDay
#hint: SCAN (only) for "double inside day" - next day look for the price to move big one way or another...
def lo = low;
def hi = high;
def vo = volume;

def s = if (hi[2] >= hi[1] and lo[2] <= lo[1]) and (hi[1] >= hi[0] and lo[1] <= lo[0])
and vo[2] >= vo[1] and vo[1] >= vo then 1 else 0;
plot signal = s within 1 bars;

How to Trade the Double Inside Bar

Similar to the inside day bar, you go long (buy calls) on the breakout of the high of the inside bar and go short (buy puts) on the breakdown of the low of the inside bar.

When you go long stop loss would be the low of the Inside Day bar.

When shorting, stop loss would be the high of the Inside Day bar.
 
Last edited:

Likos

Member
2019 Donor
@BenTen
Vql7yiH.png


It's missing a function or something? Am I doing this incorrectly?

 
Last edited:

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
@Likos You didn't copy the whole thing. It's missing the following code:

Rich (BB code):
plot signal = s within 1 bars;
 
Last edited:

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
@Bluephire1914 You can save the scanner as a watchlist and have it displayed on the left sidebar &#128512;

 
Last edited:

dougn

Member
2019 Donor
This forum is great and I've learned some great ideas here. Thanks!

Referring to this Double Inside script. Can it also be a Colorized Watchlist Column? Do-able probably ... but impossible for me. ;-) (The scanner script seems to work fine but only produces 1.0 and 0.0...not very attractive for a watchlist).

(Edit includes my solution)...
Code:
#DoubleInsideDay
#hint: SCAN (only) for "double inside day" - next day look for the price to move big one way or another...
def lo = low;
def hi = high;
def vo = volume;

def s = if (hi[2] >= hi[1] and lo[2] <= lo[1]) and (hi[1] >= hi[0] and lo[1] <= lo[0])
and vo[2] >= vo[1] and vo[1] >= vo then 1 else 0;
plot signal = s within 1 bars;

addlabel(1, if signal then "Di" else " ", color.green);
 
Last edited:

mbarcala

Active member
VIP
Hi, I'm new to this site and this post got my attention. Would it be possible for any of you to share a picture on how this indicator actually works in the graphic chart or Watchlist when the indication is happening?
 

mbarcala

Active member
VIP
No I haven't tried it yet. Just to have an idea how it looks in a photo.

What I'm looking for is a watchlist indicator that tells me which company hits a low or high price hourly.
 

tomsk

Well-known member
VIP
@mbarcala Here is a High Low Watchlist column code that works on daily, hourly or whatever aggregation you may be interested in. Just make sure you select that when you configure your watchlist

Code:
# High Low Watchlist
# tomsk
# 1.23.2020

def cond = if high == close then 1 else if low == close then -1 else 0;
AddLabel(1, if cond == 1 then "High" else if cond == -1 then "Low" else "Range", Color.Black);
AssignBackgroundColor(if cond == 1 then Color.Green else if cond == -1 then Color.Red else Color.Gray);
# End High Low Watchlist
 

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.
Top