Zack_The_Lego

Flex Renko Emulator

update:
As far as my algorithm design will take me this is it. So It's complete in my eyes. Here is a "working" version of something I've been looking for for a long time: "Flex" Renko Charting.
Bricks' sizes are determined by ATR and are set by simply choosing a resolution for the ATR calculation. No need to go in and choose renko granulation(resolution) AND brick size. Renko granulation is current chart resolution. Feel free to send me feedback on how to manage the reversal bricks' calculation or any other thoughts and ideas.

Replace the "close" in the main body of the renko calculation with 'high' and 'low' to get more consistent paintings across different aggregations since renkos aren't technically based off closing prices but where the price has been. Of course it's all a matter of preference:
Brick1 = high >
nz(Brick1) + BrickSize ? nz(Brick1) + BrickSize : low <
nz(Brick1) - BrickSize ?
nz(Brick1) - BrickSize
: nz(Brick1)


오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?
//Zack_the_Lego
study("Flex Renko Emulator", overlay = true)
res = input(type=resolution, defval = "D", title = "Resolution of ATR")
xATR = atr(14)
//TF = x78tf ? "78" : "39"
BrickSize = security(tickerid,res, xATR)

Brick1    =  close >
        nz(Brick1[1]) + BrickSize ? nz(Brick1[1]) + BrickSize : close <
                    nz(Brick1[1]) - BrickSize ?
                        nz(Brick1[1]) - BrickSize
                            : nz(Brick1[1])
                            
Brick2 = Brick1 != Brick1[1] ? Brick1[1] : nz(Brick2[1])
colorer = Brick1 > Brick2 ? green:red
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)