Big Bar Breakout Indicator for ThinkorSwim

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
I found this via the Yahoo's thinkScript group.

hi-i'm using Larthomp's 'Big Bar Breakout' which Colors the Big Bars Yellow. Would it be possible to hide all other Bars / Candles on the chart ; and only show the current / last one to five bars , by user input ? thanks in advance for any help.

Let me clarify- '' Hide all Price Bars / Candles'' - do not hide any Wide Breakout ( yellow/magenta) bars.

Thanks again for this great script ! I use the rectangle tool to draw a dark gray cloud over the Yellow / magenta bar and extend right 'X' bars in future. Can this Big Bar Cloud be automated into the script with user input ? Thanks again.

hi-I don't know if this idea is feasible; but would it be possible to create an ema of the Big Bars ( yellow / magenta ) only ? Thanks .

eFunOth.png

K14fX1T.png


thinkScript Code

Code:
#Added optional horizontal lines at high/low of breakout/breakdown bars, with options to show clouds and limit the length of the lines/clouds

#Breakout/Breakdown based upon input of BigBarsize (Current bar's range is at least input of bigbarsize multiple of the highest range of the input of number of priorbars)
#Three options for alerting a BigBar Breakout/Breakdown
#Added input last_bars_displayed to show the actual bar color of these input number of bars, except breakout and breakdown bars, which will always be colored yellow or magenta. All other bars will be colored gray.
#Added optional horizontal lines at high/low of breakout/breakdown bars, with options to show clouds and limit the length of the lines/clouds
#Added Average of breakout/breakdown bars

input priorbars = 3;
input bigbarsize = 3.0;
def range = high - low;
def breakout = if high > Highest(high[1], priorbars) and
range >= Highest(range[1], priorbars) * bigbarsize
then 1 else 0;
def breakdown = if low < Lowest(low[1], priorbars) and
range >= Highest(range[1], priorbars) * bigbarsize
then 1 else 0;

def lastbar = if !IsNaN(close) and IsNaN(close[-1]) then BarNumber() else Double.NaN;
input last_bars_displayed = 5;

input coloralert = yes;
AssignPriceColor(if coloralert and breakout then Color.YELLOW else
if coloralert and breakdown then Color.MAGENTA else
if BarNumber() < HighestAll(lastbar) - last_bars_displayed then Color.GRAY
else Color.CURRENT);

def b_high = if breakdown or breakout then high else b_high[1];
def b_low  = if breakdown or breakout then low  else b_low[1];
input show_clouds        = yes;
input show_horizontals   = yes;
input limit_cloud_length = yes;
input cloud_length       = 10;
def b_length = if breakdown or breakout then 1 else b_length[1] + 1;

plot hh = if show_horizontals then
if limit_cloud_length == no or limit_cloud_length == yes and b_length <= cloud_length then b_high
else Double.NaN
else Double.NaN;

plot ll = if show_horizontals then
if limit_cloud_length == no or limit_cloud_length == yes and b_length <= cloud_length then b_low
else Double.NaN
else Double.NaN;

hh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
ll.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
hh.SetDefaultColor(Color.GRAY);
ll.SetDefaultColor(Color.GRAY);

AddCloud(if !show_clouds then Double.NaN else hh, ll, Color.DARK_GRAY, Color.DARK_GRAY);

input soundalert = yes;
Alert(soundalert and breakout , "Breakout" , Alert.BAR, Sound.Ding);
Alert(soundalert and breakdown, "Breakdown", Alert.BAR, Sound.Ding);

input bubblealert = yes;
input tick_offset = 3;
AddChartBubble(bubblealert and IsNaN(close[-1]),
low - TickSize() * tick_offset,
" R:" + AsText(range) + "\nHR:" + AsText(Highest(range[1], priorbars)),
if breakout then Color.YELLOW else
if breakdown then Color.MAGENTA
else Color.GRAY, no);

def fb    = if !breakout and !breakdown and (breakdown or breakout) then 1 else fb[1] + 1;
def b_tot = if fb >= 1 and (breakout or breakdown) then (b_high+b_low)/2 + b_tot[1] else b_tot[1];
def b_ct  = if fb >= 1 and (breakout or breakdown) then b_ct[1] + 1 else b_ct[1];
plot Avg  = if fb >= 1 then b_tot / b_ct else Double.NaN;
Avg.SetDefaultColor(Color.MAGENTA);
Avg.SetLineWeight(2);

Shareable Link

https://tos.mx/VQ29hG
Credits:
 

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
@bitbob I tried to look into the name of the author but nothing. This is pretty much all I can find.
 

Hguru

Member
@bitbob I tried to look into the name of the author but nothing. This is pretty much all I can find.
Ben,
written by Larry Thompson otherwise know as Lar LB ZZZ or BLT in many different rooms. He is not around much anymore but he is one of the best thinkscript coders anywhere.
 

Zhland

New member
does anybody have a script to mimic this one?? Put a post up about it and was refereed to this thread...


this looks like an awesome set up!
 

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
@Zhland Since you watched the video, what is the difference between this indicator and the one shown in that video?
 

Zhland

New member
Plotting a 40% retracement line and putting in the buy arrow signal? strategy to back test all of it with order placement?
 

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
@Taye You should be able to under the indicator's settings. The option is called coloralert. Set it from Yes to No.

If that doesn't work, look for the following snippet in the code and remove it.

Code:
AssignPriceColor(if coloralert and breakout then Color.YELLOW else
if coloralert and breakdown then Color.MAGENTA else
if BarNumber() < HighestAll(lastbar) - last_bars_displayed then Color.GRAY
else Color.CURRENT);
 

FOTM_8888

Active member
does anybody have a script to mimic this one?? Put a post up about it and was refereed to this thread...


this looks like an awesome set up!
hello to all! do someone have this strategy? if so do you mine share it with us. thank you very much
 

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