Zack_The_Lego

ZTLs Percentage-based Renko Emulator

Here is another version of my Flex Renko script. It is uses percentage-based brick sizes to draw the Renkos instead of ATR or static brick sizes. What makes the percentage-based drawing style great is that one doesn't need to adjust stops so many times like they would with a ATR based Renko. It also makes moving between tickers smooth as well as one doesn't have to adjust the brick-size for each name.

to use: By default the setting is ".001" or 10 basis points. So ".01" is 1 percent or 100 basis points and so-forth. This style is perfect for those traders who make trades on a percentage basis over a price-level basis. It's also good for percentage-based stops.

The yellow lines represent where the price needs to go to draw another Renko brick.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
//Zack_the_Lego
study("ZTLs % Renko Emulator", overlay = true)
res = input(.001, minval = .0001, maxval = .30, title = "Resolution of ATR")

BrickSize = close[1] * res
 
Brick1    =  high >
        nz(Brick1[1],close) + BrickSize ? nz(Brick1[1],close) + BrickSize : low <
                    nz(Brick1[1],close) - BrickSize ?
                        nz(Brick1[1],close) - BrickSize
                            : nz(Brick1[1],close)
                            
Brick2 = Brick1 != Brick1[1] ? Brick1[1] : nz(Brick2[1],close)

projected = Brick1> Brick2 ? BrickSize + Brick1: Brick1 - BrickSize
projected2 = Brick1 > Brick2 ? Brick2 - BrickSize : Brick2 + BrickSize
colorer = Brick1 > Brick1[2]  ? aqua: Brick1 < Brick1[2] ? red : gray

plot(projected, color = yellow)
plot(projected2, color = yellow)
p1=plot(Brick1, color = colorer, linewidth= 4, title = "Renko")
p2=plot(Brick2, color = colorer, linewidth= 4, title = "Renko")
fill(p1,p2, color = purple, transp= 50)