a

64
//version=5

indicator("REPLAY ichimoku" , overlay=true)
TIME = input.time(defval = timestamp('11 Feb 2022') , confirm=true)
RP = time < TIME
OPEN = RP ? open : na
HIGH = RP ? high : na
LOW = RP ? low : na
CLOSE = RP ? close : na
COLOR = close>open ? color.green : close<open ? color.red : color.black
plotcandle(OPEN, HIGH , LOW , CLOSE , color=COLOR , wickcolor = COLOR , bordercolor = COLOR)
//////////////////////////////////////////////////////////////////////////////////////
conversionPeriods = input.int(9, minval=1, title="Conversion Line Length")
basePeriods = input.int(26, minval=1, title="Base Line Length")
laggingSpan2Periods = input.int(52, minval=1, title="Leading Span B Length")
displacement = input.int(26, minval=1, title="Displacement")
donchian(len) => math.avg(ta.lowest(len), ta.highest(len))
conversionLine = RP ? donchian(conversionPeriods) : na
baseLine = RP ? donchian(basePeriods) : na
leadLine1 = RP ? math.avg(conversionLine, baseLine) : na
leadLine2 = RP ? donchian(laggingSpan2Periods) : na
plot(conversionLine, color=#2962FF, title="Conversion Line")
plot(baseLine, color=#B71C1C, title="Base Line")
c_close= RP ? close : na
plot(c_close, offset = -displacement + 1, color=#43A047, title="Lagging Span")
p1 = plot(leadLine1, offset = displacement - 1, color=#A5D6A7,
title="Leading Span A")
p2 = plot(leadLine2, offset = displacement - 1, color=#EF9A9A,
title="Leading Span B")
fill(p1, p2, color = leadLine1 > leadLine2 ? color.rgb(67, 160, 71, 90) : color.rgb(244, 67, 54, 90))

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.