RicardoSantos

[RS]Renko Stop and Go V1

EXPERIMENTAL: renko crossover system
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
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)