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.

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?
//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)