//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")
取消訂單
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
