
Chiến lược này là một hệ thống theo dõi xu hướng dựa trên sự giao thoa của nhiều chỉ số kỹ thuật, kết hợp ba chỉ số EMA, LSMA và RSI để lọc các cơ hội giao dịch thông qua xác nhận nhiều tín hiệu. Chiến lược này sử dụng cơ chế dừng lỗ thích ứng, có thể điều chỉnh các tham số quản lý rủi ro theo động thái thị trường.
Lập luận cốt lõi của chiến lược bao gồm:
Chiến lược này xây dựng một hệ thống theo dõi xu hướng tương đối vững chắc thông qua việc sử dụng kết hợp nhiều chỉ số kỹ thuật. Điểm mạnh cốt lõi của chiến lược là độ tin cậy của tín hiệu xác nhận, nhưng cũng cần chú ý đến vấn đề thích ứng trong các môi trường thị trường khác nhau. Bằng cách tối ưu hóa và cải tiến liên tục, chiến lược có khả năng hoạt động tốt hơn trong giao dịch thực tế.
/*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")