ZTLs Percentage-based Renko Emulator

Here is a version of my Renko script but with percentage-based Renko brick sizes instead of ATR or static brick sizes. This way, you can add dependable alerts that won't need to be adjusted due to fluctuating ATR values but also allows you move through different charts without having to adjust your Renko Brick-sizes for each ticker.

To use: The Renko size setting defaults to ".001" or 10 basis points. So ".01" is 1 percent or 100 basis points. This Renko Script is perfect for those that trade in a strictly percentage based style (instead of price levels).

The yellow lines are where the next brick will be drawn.


Remove from Favorite Scripts Add to Favorite Scripts
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)
Ideas Scripts Chart
United States
United Kingdom
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out