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.
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.
//Zack_the_Lego study("ZTLs % Renko Emulator", overlay = true) res = input(.001, minval = .0001, maxval = .30, title = "Resolution of ATR") BrickSize = close * res Brick1 = high > nz(Brick1,close) + BrickSize ? nz(Brick1,close) + BrickSize : low < nz(Brick1,close) - BrickSize ? nz(Brick1,close) - BrickSize : nz(Brick1,close) Brick2 = Brick1 != Brick1 ? Brick1 : nz(Brick2,close) projected = Brick1> Brick2 ? BrickSize + Brick1: Brick1 - BrickSize projected2 = Brick1 > Brick2 ? Brick2 - BrickSize : Brick2 + BrickSize colorer = Brick1 > Brick1 ? aqua: Brick1 < Brick1 ? 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)