OPEN-SOURCE SCRIPT
RSI + WaveTrend Sinyal Alarmı

//version=5
indicator("RSI + WaveTrend Sinyal Alarmı", overlay=true)
// === RSI Divergence ===
len = input.int(9, "RSI Period")
src = input.source(close, "RSI Source")
lbR = input.int(3, "Pivot Lookback Right")
lbL = input.int(1, "Pivot Lookback Left")
osc = ta.rsi(src, len)
plFound = not na(ta.pivotlow(osc, lbL, lbR))
phFound = not na(ta.pivothigh(osc, lbL, lbR))
oscHL = osc[lbR] > ta.valuewhen(plFound, osc[lbR], 1)
priceLL = low[lbR] < ta.valuewhen(plFound, low[lbR], 1)
bullCond = priceLL and oscHL and plFound
oscLL = osc[lbR] < ta.valuewhen(plFound, osc[lbR], 1)
priceHL = low[lbR] > ta.valuewhen(plFound, low[lbR], 1)
hiddenBullCond = priceHL and oscLL and plFound
oscLH = osc[lbR] < ta.valuewhen(phFound, osc[lbR], 1)
priceHH = high[lbR] > ta.valuewhen(phFound, high[lbR], 1)
bearCond = priceHH and oscLH and phFound
oscHH = osc[lbR] > ta.valuewhen(phFound, osc[lbR], 1)
priceLH = high[lbR] < ta.valuewhen(phFound, high[lbR], 1)
hiddenBearCond = priceLH and oscHH and phFound
rsiBuySignal = bullCond or hiddenBullCond
rsiSellSignal = bearCond or hiddenBearCond
// === WaveTrend ===
n1 = input.int(10, "WT Channel Length")
n2 = input.int(21, "WT Average Length")
ap = 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)
wtCrossUp = ta.crossover(wt1, wt2)
wtCrossDown = ta.crossunder(wt1, wt2)
// === Ortak Sinyal Şartı ===
buySignal = wtCrossUp and rsiBuySignal
sellSignal = wtCrossDown and rsiSellSignal
plotshape(buySignal, style=shape.labelup, color=color.lime, text="AL", title="AL Sinyali")
plotshape(sellSignal, style=shape.labeldown, color=color.red, text="SAT", title="SAT Sinyali")
alertcondition(buySignal, title="AL Sinyali", message="RSI Divergence + WaveTrend AL sinyali oluştu!")
alertcondition(sellSignal, title="SAT Sinyali", message="RSI Divergence + WaveTrend SAT sinyali oluştu!")
indicator("RSI + WaveTrend Sinyal Alarmı", overlay=true)
// === RSI Divergence ===
len = input.int(9, "RSI Period")
src = input.source(close, "RSI Source")
lbR = input.int(3, "Pivot Lookback Right")
lbL = input.int(1, "Pivot Lookback Left")
osc = ta.rsi(src, len)
plFound = not na(ta.pivotlow(osc, lbL, lbR))
phFound = not na(ta.pivothigh(osc, lbL, lbR))
oscHL = osc[lbR] > ta.valuewhen(plFound, osc[lbR], 1)
priceLL = low[lbR] < ta.valuewhen(plFound, low[lbR], 1)
bullCond = priceLL and oscHL and plFound
oscLL = osc[lbR] < ta.valuewhen(plFound, osc[lbR], 1)
priceHL = low[lbR] > ta.valuewhen(plFound, low[lbR], 1)
hiddenBullCond = priceHL and oscLL and plFound
oscLH = osc[lbR] < ta.valuewhen(phFound, osc[lbR], 1)
priceHH = high[lbR] > ta.valuewhen(phFound, high[lbR], 1)
bearCond = priceHH and oscLH and phFound
oscHH = osc[lbR] > ta.valuewhen(phFound, osc[lbR], 1)
priceLH = high[lbR] < ta.valuewhen(phFound, high[lbR], 1)
hiddenBearCond = priceLH and oscHH and phFound
rsiBuySignal = bullCond or hiddenBullCond
rsiSellSignal = bearCond or hiddenBearCond
// === WaveTrend ===
n1 = input.int(10, "WT Channel Length")
n2 = input.int(21, "WT Average Length")
ap = 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)
wtCrossUp = ta.crossover(wt1, wt2)
wtCrossDown = ta.crossunder(wt1, wt2)
// === Ortak Sinyal Şartı ===
buySignal = wtCrossUp and rsiBuySignal
sellSignal = wtCrossDown and rsiSellSignal
plotshape(buySignal, style=shape.labelup, color=color.lime, text="AL", title="AL Sinyali")
plotshape(sellSignal, style=shape.labeldown, color=color.red, text="SAT", title="SAT Sinyali")
alertcondition(buySignal, title="AL Sinyali", message="RSI Divergence + WaveTrend AL sinyali oluştu!")
alertcondition(sellSignal, title="SAT Sinyali", message="RSI Divergence + WaveTrend SAT sinyali oluştu!")
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.