OPEN-SOURCE SCRIPT

Hacim Analizli Destek-Direnç Stratejisi (Uyarılı)

102
//version=5
indicator("Hacim Analizli Destek-Direnç Stratejisi (Uyarılı)", overlay=true)

// Parametreler
var float entryPrice = na
var bool inTrade = false
var float takeProfitLevel = na
var float stopLossLevel = na

// Hacim ve Fiyat Hareketi
volumeThreshold = input.float(100000, title="Hacim Eşiği")
priceChangeThreshold = input.float(2.0, title="Fiyat Değişimi Eşiği (%)")

// Destek ve Direnç Seviyeleri
lookbackPeriod = input.int(14, title="Destek/Direnç Periyodu")
supportLevel = ta.lowest(low, lookbackPeriod)
resistanceLevel = ta.highest(high, lookbackPeriod)

// Destek ve Direnç Çizgilerini Çiz
plot(supportLevel, color=color.green, linewidth=2, title="Destek")
plot(resistanceLevel, color=color.red, linewidth=2, title="Direnç")

// Hacim Analizi
volumeDecreaseThreshold = input.float(0.7, title="Hacim Azalma Eşiği (%)")
volumeDecrease = volume < (volume[1] * volumeDecreaseThreshold)

// Yükseliş Hacmi ve Kırılım Tespiti
volumeIncrease = volume > volumeThreshold
priceBreakout = close > resistanceLevel // Direnç seviyesini kırma

// Giriş Koşulu
if (volumeIncrease and priceBreakout and not inTrade)
entryPrice := close
takeProfitLevel := entryPrice * (1 + priceChangeThreshold / 100)
stopLossLevel := entryPrice * (0.98) // %2 stop loss
inTrade := true
label.new(bar_index, low, text="Giriş", style=label.style_circle, color=color.green, textcolor=color.white)
alert("Giriş Sinyali: " + str.tostring(close), alert.freq_once_per_bar)

// Çıkış Koşulu (Kar Alma veya Stop Loss)
if (inTrade)
if (close >= takeProfitLevel)
inTrade := false
label.new(bar_index, high, text="Kar Al", style=label.style_circle, color=color.blue, textcolor=color.white)
alert("Kar Alma Sinyali: " + str.tostring(close), alert.freq_once_per_bar)
else if (close <= stopLossLevel)
inTrade := false
label.new(bar_index, low, text="Stop Loss", style=label.style_circle, color=color.red, textcolor=color.white)
alert("Stop Loss Sinyali: " + str.tostring(close), alert.freq_once_per_bar)

// Hacim Azalma Uyarısı
if (volumeDecrease)
label.new(bar_index, high, text="Hacim Azalıyor", style=label.style_label_down, color=color.orange, textcolor=color.white)
alert("Hacim Azalıyor: " + str.tostring(close), alert.freq_once_per_bar)

// Grafikte Giriş ve Çıkışları Gösterme
plotshape(series=volumeIncrease and priceBreakout, location=location.belowbar, color=color.green, style=shape.labelup, text="Giriş")
plotshape(series=close >= takeProfitLevel, location=location.abovebar, color=color.blue, style=shape.labeldown, text="Kar Al")
plotshape(series=close <= stopLossLevel, location=location.belowbar, color=color.red, style=shape.labeldown, text="Stop Loss")

// Hacim Grafiği
plot(volume, title="Hacim", color=color.blue, style=plot.style_columns)

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.