
Die Strategie basiert auf einem Trend-Tracking-System, das auf einer Kreuzung von mehreren technischen Indikatoren basiert und die drei Indikatoren EMA, LSMA und RSI kombiniert, um Handelschancen durch mehrere Signalbestätigungen zu filtern. Die Strategie verwendet einen adaptiven Stop-Loss-Mechanismus, der die Risikomanagementparameter an die dynamischen Marktentwicklungen anpasst.
Die Kernlogik der Strategie umfasst folgende Aspekte:
Die Strategie baut durch die kombinierte Verwendung von mehreren technischen Indikatoren ein relativ robustes Trend-Tracking-System auf. Die Kernvorteile der Strategie liegen in der Zuverlässigkeit der Signalbestätigung, aber auch in der Anpassungsfähigkeit in verschiedenen Marktumgebungen. Durch kontinuierliche Optimierung und Verbesserung wird die Strategie in der Lage sein, im realen Handel besser zu funktionieren.
/*backtest
start: 2024-02-19 00:00:00
end: 2025-02-17 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=6
strategy("EMA 6-20 + LSMA 333 + RSI 50 Filtreli Al-Sat Stratejisi", overlay=true)
// Parametreler
emaShortLength = input.int(6, title="Kısa EMA Uzunluğu", minval=1)
emaLongLength = input.int(20, title="Uzun EMA Uzunluğu", minval=1)
lsmaLength = input.int(333, title="LSMA Uzunluğu", minval=1)
rsiLength = input.int(14, title="RSI Uzunluğu", minval=1)
stopLossPerc = input.float(1.0, title="Stop Loss Yüzdesi", minval=0.1)
takeProfitPerc = input.float(2.0, title="Take Profit Yüzdesi", minval=0.1)
// EMA Hesaplamaları
emaShort = ta.ema(close, emaShortLength)
emaLong = ta.ema(close, emaLongLength)
// LSMA Hesaplaması
lsma = ta.linreg(close, lsmaLength, 0)
// RSI Hesaplaması
rsi = ta.rsi(close, rsiLength)
// EMA Kesişimleri
emaCrossUp = ta.crossover(emaShort, emaLong) // EMA 6, EMA 20'nin üzerine çıkarsa
emaCrossDown = ta.crossunder(emaShort, emaLong) // EMA 6, EMA 20'nin altına inerse
// LSMA Filtresi
lsmaFilterBuy = close > lsma // Fiyat LSMA 333'ün üzerinde mi?
lsmaFilterSell = close < lsma // Fiyat LSMA 333'ün altında mı?
// RSI Filtresi
rsiFilterBuy = rsi > 50 // RSI 50'nin üzerinde mi?
rsiFilterSell = rsi < 50 // RSI 50'nin altında mı?
// Alım ve Satım Koşulları
if (emaCrossUp and lsmaFilterBuy and rsiFilterBuy) // EMA 6, EMA 20'nin üzerine çıkarsa VE fiyat LSMA 333'ün üzerindeyse VE RSI 50'nin üzerindeyse
strategy.entry("Al", strategy.long)
strategy.exit("Take Profit/Stop Loss", "Al", stop=close * (1 - stopLossPerc / 100), limit=close * (1 + takeProfitPerc / 100))
if (emaCrossDown and lsmaFilterSell and rsiFilterSell) // EMA 6, EMA 20'nin altına inerse VE fiyat LSMA 333'ün altındaysa VE RSI 50'nin altındaysa
strategy.entry("Sat", strategy.short)
strategy.exit("Take Profit/Stop Loss", "Sat", stop=close * (1 + stopLossPerc / 100), limit=close * (1 - takeProfitPerc / 100))
// EMA, LSMA ve RSI Çizgileri
plot(emaShort, color=color.blue, title="EMA 6", linewidth=2)
plot(emaLong, color=color.red, title="EMA 20", linewidth=2)
plot(lsma, color=color.orange, title="LSMA 333", linewidth=2)
hline(50, "RSI 50 Seviyesi", color=color.gray)
// Kesişim İşaretleri
plotshape(series=emaCrossUp and lsmaFilterBuy and rsiFilterBuy, location=location.belowbar, color=color.green, style=shape.labelup, text="Al Sinyali")
plotshape(series=emaCrossDown and lsmaFilterSell and rsiFilterSell, location=location.abovebar, color=color.red, style=shape.labeldown, text="Sat Sinyali")