Dline
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © ChatchaiMeena
//@version=5
indicator(title="Double Line", shorttitle="Dline", overlay=true, timeframe="", timeframe_gaps=true)
length = input.int(233, minval=1)
length2 = input.int(89, minval=1)
src = input(close, title="Source")
e1 = ta.ema(src, length)
e2 = ta.ema(e1, length)
e3 = ta.ema(src, length2)
dema = 2 * e1 - e2
dline = (e3 + dema)/2
length3 = input.int(610, minval=1)
ema1 = ta.ema(close, length3)
ema2 = ta.ema(ema1, length3)
ema3 = ta.ema(ema2, length3)
out = 3 * (ema1 - ema2) + ema3
plot(out, "TEMA", color=#2962FF)
plot(dema, "DEMA", color=#43A047)
plot(e3,"EMA", color=#43A044)
plot(dline,"DLINE",color=#A43048)
percent = input(10.0)
k = percent/100.0
upper = out * (1 + k)
lower = out * (1 - k)
u = plot(upper, "Upper", color=#2962FF)
l = plot(lower, "Lower", color=#2962FF)
barcolor(dline < close ? color.green: color.red)

