stocktrader15

ST15 Renko S/R V1

60
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!!
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
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)