OPEN-SOURCE SCRIPT

LSTM Benzeri Al-Sat Sinyali

//version=5
indicator("LSTM Benzeri Al-Sat Sinyali", overlay=true)

// Parametreler
macd_fast_length = input(12, title="MACD Hızlı Uzunluk")
macd_slow_length = input(26, title="MACD Yavaş Uzunluk")
macd_signal_length = input(9, title="MACD Sinyal Uzunluk")
rsi_length = input(14, title="RSI Uzunluk")
rsi_overbought = input(70, title="RSI Aşırı Alım Seviyesi")
rsi_oversold = input(30, title="RSI Aşırı Satım Seviyesi")

// MACD Hesapla
[macd_line, signal_line, _] = ta.macd(close, macd_fast_length, macd_slow_length, macd_signal_length)

// RSI Hesapla
rsi = ta.rsi(close, rsi_length)

// Al-Sat Sinyalleri
buy_signal = ta.crossover(macd_line, signal_line) and rsi < rsi_oversold
sell_signal = ta.crossunder(macd_line, signal_line) and rsi > rsi_overbought

// Sinyalleri Çiz
plotshape(series=buy_signal, title="Al Sinyali", location=location.belowbar, color=color.green, style=shape.labelup, text="AL")
plotshape(series=sell_signal, title="Sat Sinyali", location=location.abovebar, color=color.red, style=shape.labeldown, text="SAT")

// MACD ve RSI Grafikleri
hline(rsi_overbought, "Aşırı Alım", color=color.red)
hline(rsi_oversold, "Aşırı Satım", color=color.green)
plot(macd_line, color=color.blue, title="MACD")
plot(signal_line, color=color.orange, title="Sinyal")

Wyłączenie odpowiedzialności