timeframe(240 minutes)
////////////////////////////////////////////////////////////////////////////////////////////////////////////
//TKP T3 Ema Trend | Indicator
////////////////////////////////////////////////////////////////////////////////////////////////////////////
// T3 MA5 - TKP T3 Trend PSar2
aLength = 5
AxPrice = close
axe1 = ExponentialAverage[aLength](AxPrice)
axe2 = ExponentialAverage[aLength](axe1)
axe3 = ExponentialAverage[aLength](axe2)
axe4 = ExponentialAverage[aLength](axe3)
axe5 = ExponentialAverage[aLength](axe4)
axe6 = ExponentialAverage[aLength](axe5)
ab = 0.7
ac1 = -ab * ab * ab
ac2 = 3 * ab * ab + 3 * ab * ab * ab
ac3 = -6 * ab * ab - 3 * ab - 3 * ab * ab * ab
ac4 = 1 + 3 * ab + ab * ab * ab + 3 * ab * ab
anT3Average = ac1 * axe6 + ac2 * axe5 + ac3 * axe4 + ac4 * axe3
// T3 MA8 - TKP T3 Trend PSar
Length = 8
xPrice = close
xe1 = ExponentialAverage[Length](xPrice)
xe2 = ExponentialAverage[Length](xe1)
xe3 = ExponentialAverage[Length](xe2)
xe4 = ExponentialAverage[Length](xe3)
xe5 = ExponentialAverage[Length](xe4)
xe6 = ExponentialAverage[Length](xe5)
b = 0.7
c1 = -b * b * b
c2 = 3 * b * b + 3 * b * b * b
c3 = -6 * b * b - 3 * b - 3 * b * b * b
c4 = 1 + 3 * b + b * b * b + 3 * b * b
nT3Average = c1 * xe6 + c2 * xe5 + c3 * xe4 + c4 * xe3
timeframe(default)
DRAWHLINE (anT3Average) coloured("cyan")
DRAWHLINE (nT3Average) coloured("darkred")
////////////////////////////////////////////////////////////////////////////////////////////////////////////
Return
////////////////////////////////////////////////////////////////////////////////////////////////////////////