← กลับหน้ารายการ

ETHUSDT 4H - Keltner Breakout

Strategy ผู้เขียน: scantek Profit Factor: 1.455

ลิงก์ TradingView

เปิดใน TradingView

Equity Chart

Equity chart

เปิดรูปเต็มขนาด

คำอธิบาย

working nice with ETH above EMA200
Using Keltner bands to prevent get rid off unnecessary noices . Works at safe side
Which is fantastic for people who does not want to stick to screen full day , it needs as couple of transactions per month to gain meaningfull profit
Do not forget to use it with 4 hr time frame

Do not recommend to use it with sh*tcoins, however with a small fine tuning its okay to use it with Top altcoins

รูป Preview

Preview

Pine Script Source

//@version=5
strategy("ETHUSDT 4H - Keltner Breakout (Pro)", overlay=true, initial_capital=1000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1)

// ------------------------------------
// --- AYARLAR ---
// ------------------------------------

// 1. TREND FİLTRESİ
emaLen = input.int(200, "Ana Trend EMA")

// 2. KELTNER KANALLARI (VOLATİLİTE ÖLÇÜMÜ)
kcLen  = input.int(20, "KC Periyodu")
kcMult = input.float(2.0, "KC Çarpanı (Kırılım Hassasiyeti)", step=0.1)

// 3. RİSK YÖNETİMİ (ATR Trailing)
// 4H için geniş bir stop ve takip mesafesi
atrLen  = input.int(14, "ATR Periyodu")
slMult  = input.float(4.0, "Trailing Stop (ATR x ?)", tooltip="4H volatilite için geniş stop.")
tpPct   = input.float(20.0, "Acil Kar Al (%)", tooltip="Hedef, stop olana kadar trendi sürmektir.")

// 4. TARİH
startYear = input.int(2023, "Başlangıç Yılı")

// ------------------------------------
// --- HESAPLAMALAR ---
// ------------------------------------
emaVal = ta.ema(close, emaLen)
atrVal = ta.atr(atrLen)

// Keltner Kanalları
middleKC = ta.ema(close, kcLen)
upperKC = middleKC + (atrVal * kcMult)
lowerKC = middleKC - (atrVal * kcMult)

// ------------------------------------
// --- GİRİŞ MANTIĞI ---
// ------------------------------------

// 1. Trend Filtresi: Fiyat EMA 200 üzerinde mi?
trendUp = close > emaVal

// 2. Kırılım: Fiyat üst Keltner kanalını yukarı kesti mi?
breakout = close > upperKC

// NİHAİ GİRİŞ
longCondition = trendUp and breakout and strategy.position_size == 0 and year >= startYear

// ------------------------------------
// --- İŞLEM EMRİ ---
// ------------------------------------

if longCondition
    strategy.entry("KC Kırılım", strategy.long, comment="KIRILIM AL")

if strategy.position_size > 0
    // Dinamik Stop ve Kar Seviyesi
    stopPrice = strategy.position_avg_price - (atrVal * slMult)
    profitPrice = strategy.position_avg_price * (1 + tpPct / 100)
    
    // Çıkış Emri: Trailing Stop'a göre dinamik stop.
    strategy.exit("Trend Takip", "KC Kırılım", limit=profitPrice, stop=stopPrice)

    // EK ÇIKIŞ: Fiyat Keltner Kanalının Altına Düşerse (Trend Zayıfladı)
    if close < lowerKC
        strategy.close("KC Kırılım", comment="Kanal Altı Sat")

// ------------------------------------
// --- GÖRSELLİK ---
// ------------------------------------
plot(emaVal, color=color.white, linewidth=2, title="Trend EMA 200")
plot(upperKC, color=color.lime, title="Üst KC")
plot(lowerKC, color=color.red, title="Alt KC")