🔥10X $OM Coin Düşüşünü Yakalayan İndikatörümüzün Kodu👇
Kodu incelemek için Tradingview'deki Pine Editör kısmına yapıştırmanız yeterli. Bu kodun üstünde çalışmalarımız devam ediyor. Geliştirdikçe sizlerle paylaşmaya devam edeceğiz.🫶
//
https://t.me/version=5
indicator("Hızlı AL-SAT İndikatörü (Optimize MACD + RSI)", overlay=true)
// === INPUTLAR ===
tpPerc = input.float(2.0, title="Kar Al Yüzdesi (%)", minval=0.1)
slPerc = input.float(1.0, title="Zarar Durdur Yüzdesi (%)", minval=0.1)
rsiOversoldLevel = http://input.int/(40, title="RSI Aşırı Satım (Çıkış için)")
rsiOverboughtLevel = http://input.int/(60, title="RSI Aşırı Alım (Düşüş için)")
// === GÖSTERGELER ===
// MACD
[macdLine, signalLine, _] = ta.macd(close, 12, 26, 9)
macdCrossUp = ta.crossover(macdLine, signalLine)
macdCrossDown = ta.crossunder(macdLine, signalLine)
// RSI
rsi = ta.rsi(close, 14)
rsiBuyOk = rsi > rsiOversoldLevel
rsiSellOk = rsi < rsiOverboughtLevel
// === SİNYAL KOŞULLARI ===
rawBuy = macdCrossUp and rsiBuyOk
rawSell = macdCrossDown and rsiSellOk
// === SIRALI SİNYAL FİLTRESİ ===
var bool lastWasBuy = false
var bool lastWasSell = true
buySignal = rawBuy and lastWasSell
sellSignal = rawSell and lastWasBuy
if buySignal
lastWasBuy := true
lastWasSell := false
if sellSignal
lastWasBuy := false
lastWasSell := true
// === TP / SL Hesaplamaları ===
var float entryPrice = na
var float takeProfit = na
var float stopLoss = na
if buySignal
entryPrice := close
takeProfit := close * (1 + tpPerc / 100)
stopLoss := close * (1 - slPerc / 100)
if sellSignal
entryPrice := na
takeProfit := na
stopLoss := na
// === GRAFİĞE ÇİZİM ===
plotshape(buySignal, title="AL", location=location.belowbar, color= http://color.green/, style=shape.labelup, text="AL")
plotshape(sellSignal, title="SAT", location=location.abovebar, color= http://color.red/, style=shape.labeldown, text="SAT")
plot(takeProfit, title="Take Profit", color= http://color.green/, style=plot.style_linebr, linewidth=1)
plot(stopLoss, title="Stop Loss", color= http://color.red/, style=plot.style_linebr, linewidth=1)
// === ALARM KOŞULLARI ===
alertcondition(buySignal, title="AL Sinyali", message="AL sinyali oluştu!")
alertcondition(sellSignal, title="SAT Sinyali", message="SAT sinyali oluştu!")