# [RS]Renko Stop and Go V1

433 6
EXPERIMENTAL: renko crossover system
```study("[RS]Renko Stop and Go V1", shorttitle="[RS]RS&G.V1", overlay=true)
decay = input(250, type=float) * syminfo.mintick
detection = input(1)
smooth = input(2)
hh = highest(detection)
ll = lowest(detection)

rprice = round(close/decay)*decay
predosc = nz(dosc[1], rprice)
dosc = hh > predosc + decay and hh+decay < predosc + decay ? predosc + decay :
hh > predosc + decay and hh+decay > predosc + decay ? rprice :
ll < predosc - decay and ll-decay > predosc - decay ? predosc - decay :
ll < predosc - decay and ll-decay < predosc - decay ? rprice : predosc

///////////////
//bricksize = input(100) * syminfo.mintick
smoothprice = sma(close, smooth)

ropen = dosc

direction = ropen > ropen[1] ? 1 : ropen < ropen[1] ? -1 : nz(direction[1])

//rc = direction == 1 ? green : direction == -1 ? maroon : na

//plot(signal, style=circles, color=rc, linewidth=3, join=true)
//p00 = plot(ropen, style=cross, color=rc, linewidth=3)

rma = sma(ropen, input(12))
p0 = plot(rma, color=black, linewidth=2)

signal = cross(smoothprice, rma) ? rma : na
signalcolor = close > rma ? green : close < rma ? maroon : na
plot(signal, color=signalcolor, style=circles, linewidth=4)

topfill = plot(max(smoothprice, rma))
botfill = plot(min(smoothprice, rma))
fill(p0, topfill, color=green, transp=75)
fill(p0, botfill, color=maroon, transp=75)
//fill(p00, p01, color=gray, transp=75)
//signal = cross(smoothprice, ropen) and direction == 1 ? green :
//        cross(smoothprice, ropen) and direction == -1 ? maroon : na
//bgcolor(signal ? signalcolor : na, transp=70)```
I love Renko and this looks really good. Still eager for some way of adding velocity on here. For instance in Renko, the last bar might have occurred days ago indicating a ranging market. But don't know whether that's possible with Pine? Anyway, thanks for sharing Ricardo. Don't know whether you ever sleep :-)
Nice work Ricardo, as always :)
LazyBear
ty :p
This is a fascinating concept. Can you please explain what is going on behind the code? It appears that the renko box code is greyed out. Usually I can discern what is going on in the code but this one has me stumped.
has001u
decay is the same as the brick size, thats why its grey'd out :), thx.
it looks nice, want to check in real trading and let you know. anyway Thanks for sharing.
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter