• Get $40 off VIP by signing up for a free account! Sign Up

Renko Bars For ThinkOrSwim

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

Renko chart is already available inside ThinkorSwim.

To enable it:
  1. Click on chart's Settings
  2. Select Time axis
  3. Under Aggregation Type > Range
  4. Pick Renko Bars under Range type.



  • rGsqHlO.png
    70.1 KB · Views: 269
Last edited:
Thanks Ben I didn't know this feature on TOS.

# Renko
# Mobius

input brickSize = 5;

def c = close;
def bricks = CompoundValue(1, if c > bricks[1] + brickSize
then bricks[1] + brickSize
else if c < bricks[1] - brickSize
then bricks[1] - brickSize
else bricks[1] , bricks[1]);

plot bricks_ = Round(Bricks/TickSize(),0) * TickSize();
def mortar = CompoundValue(1, if bricks_ != bricks_[1]
then bricks_[1]
else mortar[1], mortar[1]);
plot mortar_ = Round(mortar/TickSize(),0) * TickSize();
AddCloud(bricks_, mortar_, color.green, color.red, yes);
# End Code
Last edited:
@BenTen, When i select Renko chart some of the indicator not working like l Support and resistance, Please advice...

Last edited:
@San I believe some indicators will not work with Renko charts. That could be the case.

Last edited:
How to add RENKO chart with ATR instead of time or number of tickets?
Is this a valid scenario?

My point is to trade based on ATR instead of tick / time for accuracy

I tried ATR but there is no option as Range type as RENKO bars.

If someone setup or custom code available Please let me know
Hello all,

Before I ask my question, I would like to give credit to the original creator of this Renko Overlay script, as there are no names listed within the script and I wasn't able to locate the script again in the forums. Whoever it is, thank you for your contribution. If you come forward, I would love to add your name into the script. This is a slick little script that seems to overlay(paint) higher tick Renko onto a lower tick Renko(or regular candle sticks) chart to give a better overall view of trend. As someone who tends to be trigger happy, I am personally in love with the script as it keeps me in trades longer.

QUESTION: Is there a way to add an audible alert for when the overlay changes color? I would love to cut down on my screen time. The only thing I've been able to find is a script for when the underlying renko itself changes color, but I've been unsuccessful in incorporating that alert into this overlay script.


QUESTION: Is there a way to add an audible alert for when the overlay changes color? I would love to cut down on my screen time. I was able to to find an alert script for when the underlying renko itself changes color, but I've been unsuccessful in incorporating that alert into this overlay script.

Original code:

#input BrickSize = 1.25;
input BrickTicks = 10.0;
#def BrickTicks = reference ATR();
input label = Yes;
def BrickSize = BrickTicks * TickSize();
def Mortar = CompoundValue(1, if close() > Mortar[1] + BrickSize
then Mortar[1] + BrickSize
else if close() < Mortar[1] - BrickSize then Mortar[1] - BrickSize else Mortar[1] , close());
def Stack = if Mortar != Mortar[1] then Mortar[1] else Stack[1];
def mortarext = if IsNaN(close) then mortarext[1] else Mortar;
def stackext = if IsNaN(close) then stackext[1] else Stack;
plot Bricks = Mortar; plot Renko = Stack;
#plot Bricksext = mortarext;
#plot Renkoext = stackext;
input showcloud = yes;
def same=if same[1]==0 and bricks>bricks[1] and bricks>renko[1] then 1 else if same[1]==1 and max(renko,bricks)>=max(renko[1],bricks[1]) then 1 else 0;
def s1= if isnan(close) then s1[1] else same;
def s=s1;
defineglobalColor("UP", color.green);
defineglobalcolor("DN", color.red);
addcloud(if showcloud and s==1 then bricks else double.nan, renko, globalcolor("UP"),globalcolor("UP"));
addcloud(if showcloud and s==0 then renko else double.nan, bricks, globalcolor("DN"),globalcolor("DN"));
plot stoploss = if !isnan(close) then double.nan else if s==0 then max(mortarext,stackext) + ticksize() else min(mortarext,stackext) - ticksize();
#Bricks.AssignValueColor(if Bricks > Renko then Color.green else Color.red);
Bricks.AssignValueColor(if s==1 then Color.green else Color.red);
Renko.AssignValueColor(if s==1 then Color.green else Color.red);
#Bricksext.AssignValueColor(if (Bricksext) > (Renkoext) then Color.GREEN else Color.RED);
#Renkoext.AssignValueColor(if (Bricksext) > (Renkoext) then Color.GREEN else Color.RED);
AddLabel(label, "Renko: " + BrickSize, if Bricks > Renko then Color.GREEN else Color.RED);
input pricecolor = no;
AssignPriceColor(if pricecolor == no then Color.CURRENT else if s==1 then Color.green else Color.red);
Last edited:
uawgmsmco, thank you for sharing! Would you be so kind to share how what is the brick tick size you use on CL and any other recommendation on how to use it profitable. Again thank so much!
@diego I'm still experimenting with this script to use it regularly as part of strategy. I actually posted it because I'm trying to figure out how to add an audible alert to when the bars change colors, lol.

As I said in the original post, this is an overlay indicator and it’s never 100% correct(just like any other indicator). It’s meant to give a general overview of trend and there may be short periods of uptrend within the overall downtrend.

Are you familiar with creating your own indicator in the ThinkOrSwim platform? If not, YouTube it. You’ll be able to copy and paste the code I originally posted.

There’s nothing to share here other than the original ThinkScript code I posted. This overlay indicator is not intended to be a strategy.
Last edited:
Somebody can help me to plot the high and the low of the last RENKO bar of premarket. Thanks in advance!

# Renko Bar Time
# Mobius
# Chat Room Request 09.03.2019

def lastBar = if isNaN(close[-1]) and !isNaN(close)
then barNumber()
else lastBar[1];
def thist = if barNumber() == lastbar
then getTime()
else thist[1];
def lastt = if barNumber() != lastBar
then getTime()
else lastt[1];
def elapsed = (thist - lastt)/1000/60;
addLabel(1, "elapsed time min: " + elapsed, color.white);
Does anyone here use Renko Bars and if so what type of indicators have you paired with them?
One or two videos on YouTube explain the importance of setting the Renko Bars,....depending on what's being traded, ETf, futures, stock...
@Miket I paper trade them with 5 ticks on a 1 day chart. I like 7, 60, 40 close settings for the RSI, and the TrueMomentumOcsillator with default settings. https://tos.mx/yXqNwi here is what I look for: bullish= rsi above 60, Oscillator in the red, and price movement up on the Renkos with at least 3 hollow green bars before I enter a trade. For bearish = rsi below 40, Oscillator in the green, and price movement down with at least 3 solid red bars.

This is better than 50% successful and fun watching the renkos paint.. no wicks! edit: Oh yeah I also use the Slim Ribbon Indicator. https://tos.mx/zbybTc
Last edited:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
336 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.