Ok here it is, I hope you dont mind I did not code color gradient of the curves? Do you need also candle coloring like in the original code, your screenshot is only about the oscillator though ..
src = medianprice
//WTO PLOT ONE
channellen = 8 //Channel Length
averagelen = 6 //Average Length
wt1malen = 3 //Moving Average Length
esa = average[channellen,1](src)
d = average[channellen,1](abs(src - esa))
ci = (src - esa) / (0.015 * d)
tci = average[averagelen,1](ci)
wt1 = tci
wt1ma = average[wt1malen](wt1)
//COLOR INPUTS
//wt_1_up = input(#ff9800, title="High", inline="wt 1 color", group="Primary Wavetrend Inputs")
//wt_1_down = input(#2962ff, title="Low", inline="wt 1 color", group="Primary Wavetrend Inputs")
//wt_1_color = color.from_gradient(wt_1, -80, 80, wt_1_down, wt_1_up)
//plot(wt_1, color=wt_1_color, title="Primary Wavetrend")
//WTO PLOT TWO
channellen2 = 13 //Channel Length
averagelen2 = 55 //Average Length
esa2 = average[channellen2,1](src)
d2 = average[channellen2,1](abs(src - esa2))
ci2 = (src - esa2) / (0.015 * d2)
tci2 = average[averagelen2,1](ci2)
wt2 = tci2
////MOMENTUM CHANGE & BACKGROUND COLORS
//PRIMARY WTO & SECONDARY WTO
momchangelong1 = wt1 crosses over 0
momchangeshort1 = wt1 crosses under 0
momchangelong2 = wt2 crosses over 0
momchangeshort2 = wt2 crosses under 0
if momchangelong1 then
backgroundcolor(0,0,255,85)
elsif momchangeshort1 then
backgroundcolor(255,0,0,85)
endif
if momchangelong2 then
backgroundcolor(0,0,255,85)
elsif momchangeshort2 then
backgroundcolor(255,0,0,85)
endif
//MOVING AVERAGE CROSS SIGNALS ON PRIMARY WAVETREND
if wt1 crosses over wt1ma then
drawtext("●",barindex,-80,dialog,bold,16) coloured(0,0,255)
elsif wt1 crosses under wt1ma then
drawtext("●",barindex,80,dialog,bold,16) coloured(255,0,0)
endif
if islastbarupdate then
drawrectangle(0,60,barindex,80) coloured(239, 83, 80,85) bordercolor(0,0,0,0)
drawrectangle(0,-60,barindex,-80) coloured(33, 150, 243,85) bordercolor(0,0,0,0)
endif
return wt1 as "Primary Wavetrend", wt2 as "Secondary Wavetrend", 0 coloured(120, 123, 134) style(dottedline) as "median", 40 coloured(120, 123, 134) style(dottedline) as "40", 20 coloured(120, 123, 134) style(dottedline) as "20", -40 coloured(120, 123, 134) style(dottedline) as "-40", -20 coloured(120, 123, 134) style(dottedline) as "-20", 80 coloured(239, 83, 80) style(dottedline) as "80", 60 coloured(239, 83, 80) style(dottedline) as "60",-80 coloured(33, 150, 243) style(dottedline) as "-80", -60 coloured(33, 150, 243) style(dottedline) as "-60"