RicardoSantos

[RS]Renko Stop and Go V1

EXPERIMENTAL: renko crossover system
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?
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)