stocktrader15

ST15 Renko S/R V1

59
I use this as part of a larger Renko scalping system to help find key S/R usually when placing TPs. I enjoy using it with 2 pip ATR renkos, but I think with a little tweaking it could work with many different trading styles. For 2 or 5 pip atr renkos it is as simple as putting it up on the chart. Hope it helps, thank you!!
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='ST15 Renko S/R V1', shorttitle='Ur Pip R Mine', overlay=true)
tf = input(title='Timeframe:', type=string, defval='60', confirm=false)
SHOW_ZIGZGAG = input(title='Show ZigZag?', type=bool, defval=false)
f_zigzag(_method, _src, _tf) =>
    _isUp = _src > _src[1]
    _isDown = _src < _src[1]
    _direction = _isUp[1] and _isDown ? -1 : _isDown[1] and _isUp ? 1 : na
    _zigzag = _isUp[1] and _isDown ? highest(2) : _isDown[1] and _isUp ? lowest(2) : na
    _m_choice = _method == 0 ? _direction : _zigzag
    _sec = security(tickerid, _tf, _m_choice)
    _return = _method == 0 ? fixnan(_sec) : change(time(_tf)) != 0 ? _sec : na

zigzag = f_zigzag(1, close, tf)

x = valuewhen(zigzag, zigzag, 1)
z = valuewhen(zigzag, zigzag, 0)
range = x-z


fib4764 = z+range*4.764

direction = x > z ? 1 : x < z ? -1 : direction[1]
plot(title='ZigZag', series=not SHOW_ZIGZGAG ? na : zigzag, color=black)
plot(title='4.764', series=change(fib4764)!=0?na:fib4764, style=linebr, color=aqua)