RicardoSantos

[RS]Renko Overlay V0

Renko Overlay:
  • tf: Timeframe to use.
  • mode:ATR or Traditional.
  • modeValue: can be whole number for ATR mode(ex:.15) or floating point value for Traditional(ex:.0.12345).
  • showOverlay: Display renko bars.
  • showBarColors: Display Bar Colors.
  • showMa: display Renko based ma.
  • MA_length: moving average length.

note: should use with scale series only toggled on, so it doesnt strech.
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?
study(title='[RS]Renko Overlay V0', shorttitle='[RS]RO.V0', overlay=true)
tf = input('5')
mode = input('Traditional')
mode_value = input(0.0005, type=float)
showOverlay = input(true)
showBarColors = input(false)
showMA = input(false)
MA_length = input(12)

rt = renko(tickerid, 'close', mode, mode_value)

ro = security(rt, tf, open)
rc = security(rt, tf, close)

colorf = rc > ro ? #00ff80 : rc < ro ? #ff8000 : gray
plot(not showOverlay ? na : max(rc,ro), color=colorf, style=columns, transp=50)
plot(not showOverlay ? na : min(rc,ro), color=white, style=columns, transp=0)

ma = showMA ? sma(ro, MA_length) : na
plot(not showMA ? na : ma, color=black, linewidth=2)

barcolor(not showBarColors ? na : rc > ro ? lime : red)