RicardoSantos

[RS]Renko Stop and Go V1

EXPERIMENTAL: renko crossover system
Remove from Favorite Scripts Add to Favorite Scripts
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 :-)
Reply
Nice work Ricardo, as always :)
Reply
ty :p
Reply
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.
You are a gifted programmer!
Reply
decay is the same as the brick size, thats why its grey'd out :), thx.
Reply
it looks nice, want to check in real trading and let you know. anyway Thanks for sharing.
Reply
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing Priority Support Ideas Published Followers Following Private Messages Chat Sign Out