//@version=6
indicator(title = 'DTC V1.0', shorttitle = 'DTC V1.0', overlay = true)
src = close
// Slow EMA Length Inputs
le
ema12 = [Link](src, len12)
// Slow EMA Color Rules
colslowL = ema7 > ema8 and ema8 > ema9 and ema9 > ema10 and ema10 > ema11 and ema11
> ema12
colslowS = ema7 < ema8 and ema8 < ema9 and ema9 < ema10 and ema10 < ema11 and ema11
< ema12
// Slow EMA Final Color Rules
colFinal2 = colslowL ? [Link] : colslowS ? [Link] : [Link]
// Slow EMA Plots
plot(ema7, title = 'Slow EMA 7', style = plot.style_line, linewidth = 4, color =
colFinal2)
plot(ema8, title = 'Slow EMA 8', style = plot.style_line, linewidth = 3, color =
colFinal2)
plot(ema9, title = 'Slow EMA 9', style = plot.style_line, linewidth = 3, color =
colFinal2)
plot(ema10, title = 'Slow EMA 10', style = plot.style_line, linewidth = 3, color
=
colFinal2)
plot(ema11, title = 'Slow EMA 11', style = plot.style_line, linewidth = 3, color
=
colFinal2)
plot(ema12, title = 'Slow EMA 12', style = plot.style_line, linewidth = 4, color
=
colFinal2)
// Buy/Sell Signal Logic
buySignal = not colslowL[1] and colslowL
sellSignal = not colslowS[1] and colslowS
// Auto-Adjust Offset (Based on ATR)
atrValue = [Link](14)
offsetDynamic = atrValue * 0.5
// Plot Buy and Sell Signals using [Link]
if buySignal
[Link](bar_index, ema7 - offsetDynamic, 'BUY', style = label.style_label_up,
yloc = [Link], color = [Link], textcolor = [Link], size = [Link])
if sellSignal
[Link](bar_index, ema7 + offsetDynamic, 'SELL', style =
label.style_label_down, yloc = [Link], color = [Link], textcolor =
[Link], size = [Link])
// Alerts
alertcondition(buySignal, title = 'Buy Alert', message = 'Buy Signal Triggered')
alertcondition(sellSignal, title = 'Sell Alert', message = 'Sell Signal Triggered')
// ? TEAM7 Label (Single Definition)
var label lbl = na
if na(lbl)
lbl := [Link](bar_index, close, "TEAM7",
color=[Link], textcolor=[Link],
size=[Link], style=label.style_label_down,
xloc=xloc.bar_index, yloc=[Link],
tooltip="TEAM7 Indicator")
else
label.set_x(lbl, bar_index)
label.set_y(lbl, close)