Untitled
Anonymous
plain_text
04/02/2026 6:30 PM
5.1 KB
12
Indexable
//@version=5
indicator("ULTRA TREND + MACD + AYRI ADR SİNYAL", overlay=true)
// ───── INPUTS ─────
len = input.int(20, "Linear Length")
emaLen = input.int(20, "EMA Trend")
slopeThr = input.float(0.0, "Slope Threshold")
rsiLen = input.int(14, "RSI Length")
rsiMin = input.int(55, "RSI Min")
rsiADR = input.int(60, "ADR RSI Min")
volMult = input.float(1.5, "Hacim Çarpanı")
fastLen = input.int(12, "MACD Fast")
slowLen = input.int(26, "MACD Slow")
sigLen = input.int(9, "MACD Signal")
adrLen = input.int(14, "ADR Periyot")
lookback = input.int(20, "Breakout Lookback")
// ───── HESAPLAMALAR ─────
linreg = ta.linreg(close, len, 0)
slope = linreg - linreg[1]
ema = ta.ema(close, emaLen)
rsi = ta.rsi(close, rsiLen)
volAvg = ta.sma(volume, 20)
[macdLine, signalLine, hist] = ta.macd(close, fastLen, slowLen, sigLen)
// ───── TREND ─────
trendUp = slope > slopeThr
priceTrend = close > ema
momentum = rsi > rsiMin
volStrong = volume > volAvg * volMult
macdBuy = hist > 0 and ta.crossover(macdLine, signalLine)
// ───── ADR ─────
dayHigh = request.security(syminfo.tickerid, "D", high)
dayLow = request.security(syminfo.tickerid, "D", low)
dayRange = dayHigh - dayLow
adr = ta.sma(dayRange, adrLen)
todayMove = high - dayLow
highestHigh = ta.highest(high, lookback)
breakout = close > highestHigh[1]
adrOk = todayMove < adr
// ───── GÜN RESET ─────
var bool adrSignalFired = false
newDay = ta.change(time("D"))
if newDay
adrSignalFired := false
// ───── SİNYALLER ─────
adrSignalRaw = breakout and rsi > rsiADR and adrOk
adrSignal = adrSignalRaw and not adrSignalFired
if adrSignal
adrSignalFired := true
ultraSignal = trendUp and priceTrend and momentum and volStrong and macdBuy
// ───── GÖSTERİM ─────
// Slope
plot(slope, color=color.blue, title="Slope")
// ULTRA AL
plotshape(ultraSignal,
title="ULTRA AL",
location=location.belowbar,
color=color.green,
style=shape.labelup,
text="AL",
size=size.tiny)
// 🔥 ADR ÇİZGİ (OTOMATİK UZAR)
var line adrLine = na
if adrSignal
adrLine := line.new(
x1=bar_index,
y1=close,
x2=bar_index,
y2=close,
color=color.rgb(30, 255, 0),
width=2)
// Her barda çizgiyi güncelle → sağa uzasın
if not na(adrLine)
line.set_x2(adrLine, bar_index)
// ───── ALERT ─────
alertcondition(ultraSignal, title="ULTRA AL", message="Güçlü trend + MACD AL")
)Editor is loading...
Leave a Comment