Breakout Explosion Indicator Question

dmillz

Member

Does anyone know how to transfer this to TOS? Looking for this awesome indicator where the stock consolidates then breaks out

Code:
``````//@version=3
study(title="Chop and explode", shorttitle="CAE")

src = close, len = input(14, minval=1, title="Length")
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))

plot(rsi, color=black)

change1 = rsi > 60 ? blue :na
change2= rsi < 40 ? purple: na

p1 = plot(rsi, style=linebr, linewidth=3, color=change1)
p2 = plot(rsi, style=linebr, linewidth=3, color=change2)

band1 = hline(70)
band2 = hline(30)
band3 = hline (60)
band4 = hline (40)
midline= hline (50)
band5=hline(55)
band6=hline(45)
fill(band1, band3, color=green, transp=90)
fill(band3, band4, color=yellow, transp=90)
fill(band4, band2, color=red, transp=90)
fill (band5,band6, color=black, transp=50)

cond1 = rsi > 60 and close[1] < rsi and close > 0 ? 1 : 0
barcolor(cond1 ? blue : na)

cond2 = rsi < 40 and close[1] < rsi and close > 0 ? 1 : 0
barcolor(cond2 ? purple : na)

cond3 = rsi > 55 and close[1] < rsi and close < 60 ? 1 : 0
barcolor(cond3 ? yellow : na)

cond4 = rsi > 45 and close[1] < rsi and close [1] < 55 ? 1 : 0
barcolor(cond4 ? black : na)

cond5 = rsi > 40 and close[1] < rsi and close [1] < 55 ? 1 : 0
barcolor(cond5 ? yellow : na)``````

That is pretty much based off of the RSI. You can either plot those levels on your RSI lower study using the drawing tool, manually modify the RSI code, or check out one of the following resources for more consolidation indicators:

This is the type of indicator im looking for

Yeah your right the consolidation box is the same as this tradeview indicator thanks

Not the exact question you're looking for?

87k+ Posts
373 Online

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

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?