//version=5
indicator(title="WT ", shorttitle="WT", overlay=true)
// ====== Kullanıcı Girdileri ======
n1 = input.int(10, "Kanal Uzunluğu")
n2 = input.int(21, "Ortalama Uzunluğu")
obLevel = input.int(60, "Aşırı Alım Seviyesi")
osLevel = input.int(-60, "Aşırı Satım Seviyesi")
// ====== WaveTrend Hesaplama ======
ap = ta.hlc3
esa = ta.ema(ap, n1)
d = ta.ema(math.abs(ap - esa), n1)
ci = (ap - esa) / (0.015 * d)
tci = ta.ema(ci, n2)
wt1 = tci
wt2 = ta.sma(wt1, 4)
histo = wt1 - wt2
// ====== Sinyal Tanımlama ======
bullCross = ta.crossover(wt1, wt2) and wt1 < osLevel
bearCross = ta.crossunder(wt1, wt2) and wt1 > obLevel
// ====== Grafik Üzerine Etiket ======
if bullCross
label.new(bar_index, low, "AL", style=label.style_label_up, color=color.lime, textcolor=color.white, size=size.normal)
if bearCross
label.new(bar_index, high, "SAT", style=label.style_label_down, color=color.red, textcolor=color.white, size=size.normal)
// ====== Bar Renkleri ======
barcolor(bullCross ? color.aqua : bearCross ? color.yellow : na)
// ====== Tablo Oluşturma ======
var table wtTable = table.new(position.top_right, 1, 3, frame_color=color.gray, frame_width=1, border_color=color.black)
table.cell(wtTable, 0, 0, "Sinyal", text_color=color.white, bgcolor=color.blue)
table.cell(wtTable, 0, 1, bullCross ? "AL" : bearCross ? "SAT" : "Bekle", text_color=color.white, bgcolor=bullCross ? color.green : bearCross ? color.red : color.gray)
table.cell(wtTable, 0, 2, str.tostring(time("D"), "yyyy-MM-dd"), text_color=color.white, bgcolor=color.black)
// ====== Histogram Çizimi ======
plot(histo, color=color.blue, style=plot.style_columns, title="WT Histogram")
plot(wt1, color=color.green, title="WT1")
plot(wt2, color=color.red, title="WT2")
indicator(title="WT ", shorttitle="WT", overlay=true)
// ====== Kullanıcı Girdileri ======
n1 = input.int(10, "Kanal Uzunluğu")
n2 = input.int(21, "Ortalama Uzunluğu")
obLevel = input.int(60, "Aşırı Alım Seviyesi")
osLevel = input.int(-60, "Aşırı Satım Seviyesi")
// ====== WaveTrend Hesaplama ======
ap = ta.hlc3
esa = ta.ema(ap, n1)
d = ta.ema(math.abs(ap - esa), n1)
ci = (ap - esa) / (0.015 * d)
tci = ta.ema(ci, n2)
wt1 = tci
wt2 = ta.sma(wt1, 4)
histo = wt1 - wt2
// ====== Sinyal Tanımlama ======
bullCross = ta.crossover(wt1, wt2) and wt1 < osLevel
bearCross = ta.crossunder(wt1, wt2) and wt1 > obLevel
// ====== Grafik Üzerine Etiket ======
if bullCross
label.new(bar_index, low, "AL", style=label.style_label_up, color=color.lime, textcolor=color.white, size=size.normal)
if bearCross
label.new(bar_index, high, "SAT", style=label.style_label_down, color=color.red, textcolor=color.white, size=size.normal)
// ====== Bar Renkleri ======
barcolor(bullCross ? color.aqua : bearCross ? color.yellow : na)
// ====== Tablo Oluşturma ======
var table wtTable = table.new(position.top_right, 1, 3, frame_color=color.gray, frame_width=1, border_color=color.black)
table.cell(wtTable, 0, 0, "Sinyal", text_color=color.white, bgcolor=color.blue)
table.cell(wtTable, 0, 1, bullCross ? "AL" : bearCross ? "SAT" : "Bekle", text_color=color.white, bgcolor=bullCross ? color.green : bearCross ? color.red : color.gray)
table.cell(wtTable, 0, 2, str.tostring(time("D"), "yyyy-MM-dd"), text_color=color.white, bgcolor=color.black)
// ====== Histogram Çizimi ======
plot(histo, color=color.blue, style=plot.style_columns, title="WT Histogram")
plot(wt1, color=color.green, title="WT1")
plot(wt2, color=color.red, title="WT2")
Đã hủy lệnh
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
