Renko Bars

Solution
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

BenTen

Administrative
Staff member
Staff
VIP
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
 
Last edited:
Solution

mo2020

New member
Thanks Ben I didn't know this feature on TOS.

Code:
# 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:

San

Member
2019 Donor
@BenTen, When i select Renko chart some of the indicator not working like l Support and resistance, Please advice...

 
Last edited:

2sureshk

Member
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

Thx
Suresh
 

uawgmsmco

New member
VIP
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.

renko-overlay.png




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:

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

New member
VIP
@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:

fcastrof

New member
Somebody can help me to plot the high and the low of the last RENKO bar of premarket. Thanks in advance!

Code:
# 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);
 

SilverWolf

New member
@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

Top