Özkan

92
//version=4
study(title="RSI & MACD Al-Sat Göstergesi", shorttitle="RSI & MACD", overlay=true)

// RSI ayarları
rsi_length = input(14, title="RSI Periyodu")
rsi_overbought = input(70, title="RSI Aşırı Alım Seviyesi")
rsi_oversold = input(30, title="RSI Aşırı Satım Seviyesi")

// MACD ayarları
fast_length = input(12, title="Hızlı EMA")
slow_length = input(26, title="Yavaş EMA")
signal_length = input(9, title="Signal EMA")

// RSI hesaplama
rsi = rsi(rsi_length)

// MACD hesaplama
[macd_line, signal_line, _] = macd(fast_length, slow_length, signal_length)

// Al-Sat Koşulları
long_condition = crossover(macd_line, signal_line) and rsi > rsi_oversold
short_condition = crossunder(macd_line, signal_line) and rsi < rsi_overbought

// Al-Sat Noktalarını Grafiğe Çizme
plotshape(long_condition, style=shape.triangleup, location=location.belowbar, color=color.green, title="Alış Noktası")
plotshape(short_condition, style=shape.triangledown, location=location.abovebar, color=color.red, title="Satış Noktası")

// RSI ve MACD Göstergelerini Çizme
hline(rsi_overbought, "Aşırı Alım Seviyesi", color=color.red)
hline(rsi_oversold, "Aşırı Satım Seviyesi", color=color.green)
plot(rsi, color=color.blue, title="RSI")
plot(macd_line - signal_line, color=color.orange, style=plot.style_histogram, title="MACD Histogram")

// RSI ve MACD Bilgilerini Sağ Kenara Gösterme
plotshape(series=long_condition, title="Alış Sinyali", location=location.right, color=color.green, style=shape.triangleup, size=size.small)
plotshape(series=short_condition, title="Satış Sinyali", location=location.right, color=color.red, style=shape.triangledown, size=size.small)

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.