0% found this document useful (0 votes)
49 views3 pages

DTC V1.0 Trading Indicator Script

The document is a TradingView Pine Script for a technical indicator called 'DTC V1.0' that utilizes multiple Exponential Moving Averages (EMAs) to generate buy and sell signals based on their color-coded trends. It includes logic for dynamic offset adjustments based on Average True Range (ATR) and provides alert conditions for buy and sell signals. Additionally, it features a label for 'TEAM7' to indicate its presence on the chart.

Uploaded by

raniresma36
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views3 pages

DTC V1.0 Trading Indicator Script

The document is a TradingView Pine Script for a technical indicator called 'DTC V1.0' that utilizes multiple Exponential Moving Averages (EMAs) to generate buy and sell signals based on their color-coded trends. It includes logic for dynamic offset adjustments based on Average True Range (ATR) and provides alert conditions for buy and sell signals. Additionally, it features a label for 'TEAM7' to indicate its presence on the chart.

Uploaded by

raniresma36
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

//@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)

You might also like