Untitled
Anonymous
plain_text
08/27/2026 6:11 AM
32.6 KB
0
Indexable
//@version=6
indicator("SCY PRO v48 - Smart Money Accumulation", overlay=false)
// =============================================================================
// SCY PRO v48
// Smart Money Accumulation + Institutional Screener
//
// v48:
// - SCY PRO v47 çekirdek mimarisi korunmuştur.
// - Buy Pressure %
// - Buy Pressure Streak
// - Buy Pressure Score
// - Volume Acceleration
// - Price Compression
// - Stealth Accumulation
// - Early Accumulation Radar
// eklenmiştir.
// =============================================================================
// =============================================================================
// 1. GİRDİLER
// =============================================================================
grpTrend = "1. Trend, MA Eğim & Uzaklık Filtreleri"
maShort = input.int(50, "Kısa MA", minval=1, group=grpTrend)
maMid = input.int(150, "Orta MA", minval=1, group=grpTrend)
maLong = input.int(200, "Uzun MA", minval=1, group=grpTrend)
useSlope = input.bool(true, "MA Eğimi (Slope) Yükselen Şartı Ekle", group=grpTrend)
slopeLen = input.int(5, "Eğim Periyodu", minval=2, group=grpTrend)
maxMa50Dist = input.float(1.12, "Maksimum MA50 Uzaklık Çarpanı", minval=1.0, group=grpTrend)
grpMinervini = "2. Zirveye Yakınlık (Minervini VCP)"
useNearHigh = input.bool(
true,
"52 Haftalık Zirveye Yakınlık Filtresini Kullan",
group=grpMinervini)
nearHighPct = input.float(
0.85,
"52H Zirveye Min. Yakınlık Oranı",
minval=0.5,
maxval=1.0,
group=grpMinervini)
grpVol = "3. Hacim & VCP Filtreleri"
volAvgLength = input.int(50, "Ortalama Hacim Periyodu (MA)", minval=1, group=grpVol)
rvolThreshold = input.float(1.8, "Minimum RVOL", minval=0.1, step=0.1, group=grpVol)
minTLVolume = input.float(20000000, "Minimum Ortalama TL Hacmi", minval=0, group=grpVol)
todayTlMult = input.float(1.20, "Dinamik Bugünkü TL Hacim Çarpanı", minval=0.5, step=0.05, group=grpVol)
dryUpPercent = input.float(0.55, "Dry-Up Eşiği", minval=0.01, step=0.01, group=grpVol)
dryUpLookback = input.int(20, "Dry-Up Arama Penceresi", minval=1, group=grpVol)
grpUD = "4. Up/Down Hacim Oranı"
udLength = input.int(50, "U/D Periyodu", minval=1, group=grpUD)
udRatioThreshold = input.float(1.2, "Min. U/D Ratio", minval=0.1, step=0.1, group=grpUD)
grpAdv = "5. Kurumsal Metrikler"
useMansfield = input.bool(true, "Mansfield RS Kullan", group=grpAdv)
mansfieldThresh = input.float(2.0, "Min. Mansfield RS Eşiği", group=grpAdv)
benchmarkSym = input.symbol("BIST:XU100", "Benchmark Sembolü", group=grpAdv)
grpBS = "6. Bull Snort & Power Volume"
showBS = input.bool(true, "Bull Snort Taramasını Dahil Et", group=grpBS)
bsMult = input.float(3.0, "Bull Snort Hacim Çarpanı", step=0.5, group=grpBS)
powRvolMult = input.float(2.0, "Power Vol Min. RVOL", minval=1.0, step=0.1, group=grpBS)
powAtrMult = input.float(1.5, "Power Vol Min. Bar/ATR", minval=0.5, step=0.1, group=grpBS)
// =============================================================================
// 7. SMART MONEY ACCUMULATION ENGINE
// =============================================================================
grpSM = "7. Smart Money Accumulation"
buyDomDays = input.int(
3,
"Min. Ardışık Alım Barı",
minval=2,
maxval=10,
group=grpSM)
minBuyPct = input.float(
55.0,
"Minimum Buy Pressure (%)",
minval=50.0,
maxval=95.0,
step=0.5,
group=grpSM)
accumDays = input.int(
5,
"Buy Pressure Lookback",
minval=3,
maxval=15,
group=grpSM)
priceRangeLen = input.int(
10,
"Fiyat Sıkışma Lookback",
minval=3,
group=grpSM)
maxPriceMove = input.float(
3.0,
"Maksimum Fiyat Hareketi (%)",
minval=0.5,
step=0.1,
group=grpSM)
volTrendLen = input.int(
5,
"Hacim Hızlanma Periyodu",
minval=2,
group=grpSM)
volTrendMult = input.float(
1.00,
"Hacim Trend Minimum Oranı",
minval=0.5,
step=0.05,
group=grpSM)
stealthMinStreak = input.int(
3,
"Stealth Min. Buy Streak",
minval=2,
maxval=10,
group=grpSM)
useStealthAccum = input.bool(
true,
"Stealth Accumulation Aktif",
group=grpSM)
useEarlyRadar = input.bool(
true,
"Early Accumulation Radar Aktif",
group=grpSM)
// =============================================================================
// 8. SKOR / GÖRSEL AYARLAR
// =============================================================================
grpMisc = "8. Ayarlar & Skor Eşikliği"
scoreThreshold = input.float(
70,
"Güçlü Aday Skor Eşiği",
minval=0,
maxval=100,
group=grpMisc)
onlyConfirmed = input.bool(
false,
"Sadece Kapanmış Bar",
group=grpMisc)
// =============================================================================
// 2. TEMEL HESAPLAMALAR
// =============================================================================
vol = volume
atr = ta.atr(14)
barRange = high - low
upDay = close > close[1]
downDay = close < close[1]
closeLoc =
barRange > 0 ?
(close - low) / barRange :
0.5
avgVol = ta.sma(vol, volAvgLength)
rvol =
avgVol > 0 ?
vol / avgVol :
na
todayTL = vol * close
avgTLVolume = ta.sma(todayTL, volAvgLength)
ema21 = ta.ema(close, 21)
// =============================================================================
// A. 52 HAFTALIK ZİRVE
// =============================================================================
highest52 = ta.highest(high, 252)
isNearHigh =
not useNearHigh or
close >= highest52 * nearHighPct
// =============================================================================
// B. UP/DOWN VOLUME RATIO
// =============================================================================
upVol = upDay ? vol : 0.0
downVol = downDay ? vol : 0.0
sumUpVol =
ta.sma(upVol, udLength) * udLength
sumDownVol =
ta.sma(downVol, udLength) * udLength
udRatio =
not na(sumDownVol) and sumDownVol > 0 ?
sumUpVol / sumDownVol :
na
// =============================================================================
// C. TREND
// =============================================================================
ma50 = ta.sma(close, maShort)
ma150 = ta.sma(close, maMid)
ma200 = ta.sma(close, maLong)
slope50 =
ta.linreg(ma50, slopeLen, 0) -
ta.linreg(ma50, slopeLen, 1)
slope150 =
ta.linreg(ma150, slopeLen, 0) -
ta.linreg(ma150, slopeLen, 1)
slope200 =
ta.linreg(ma200, slopeLen, 0) -
ta.linreg(ma200, slopeLen, 1)
basicTrend =
close > ma50 and
ma50 > ma150 and
ma150 > ma200
slopeTrend =
not useSlope or
(
slope50 > 0 and
slope150 > 0 and
slope200 > 0
)
ma50DistOK =
close <= ma50 * maxMa50Dist
aboveEma21 =
close > ema21
FullTrend =
basicTrend and
slopeTrend and
ma50DistOK and
aboveEma21
// =============================================================================
// D. MANSFIELD RS
// =============================================================================
benchClose =
request.security(
benchmarkSym,
timeframe.period,
close,
ignore_invalid_symbol=true)
rsRatio =
not na(benchClose) and benchClose != 0 ?
close / benchClose :
1.0
rsMA =
ta.sma(rsRatio, 50)
mansfieldRS =
rsMA != 0 ?
((rsRatio / rsMA) - 1.0) * 100 :
0.0
close252 =
bar_index >= 252 ?
close[252] :
na
classicRS =
not na(close252) and close252 != 0 ?
(close / close252) * 100 :
50.0
finalRS =
useMansfield ?
mansfieldRS :
classicRS
isRSStrong =
useMansfield ?
mansfieldRS >= mansfieldThresh :
classicRS > 80
// =============================================================================
// E. DİNAMİK VOLUME PERCENTILE
// =============================================================================
dynMinPctile =
timeframe.isdaily ?
90.0 :
80.0
volPercentile =
ta.percentrank(vol, 252)
// =============================================================================
// F. POCKET PIVOT
// =============================================================================
downVolOnly =
downDay ?
vol :
0.0
highestDownLong =
ta.highest(downVolOnly, 10)[1]
highestDownShort =
ta.highest(downVolOnly, 5)[1]
PocketPivot10 =
upDay and
not na(highestDownLong) and
vol > highestDownLong and
closeLoc >= 0.66
PocketPivot5 =
upDay and
not na(highestDownShort) and
vol > highestDownShort and
closeLoc >= 0.66 and
not PocketPivot10
// =============================================================================
// G. DRY-UP
// =============================================================================
DryUp =
avgVol > 0 and
vol <= avgVol * dryUpPercent
barsSinceDry =
ta.barssince(DryUp)
DryUpLast20 =
not na(barsSinceDry) and
barsSinceDry <= dryUpLookback
hadDryUpRecently =
not na(barsSinceDry) and
barsSinceDry >= 1 and
barsSinceDry <= 3
isDryUpBreakout =
hadDryUpRecently and
upDay and
vol > avgVol and
closeLoc >= 0.60
// =============================================================================
// H. BULL SNORT / POWER VOLUME
// =============================================================================
isRangeExpansion =
barRange > ta.sma(barRange, 10)
isBullSnort =
showBS and
close > ema21 and
FullTrend and
vol >= avgVol * bsMult and
closeLoc >= 0.65 and
upDay and
close[1] <= open[1] and
isRangeExpansion
isPowerUp =
upDay and
rvol >= powRvolMult and
barRange >= atr * powAtrMult
// =============================================================================
// I. SMART MONEY — BUY PRESSURE
// =============================================================================
// Mevcut bar için geometric buy pressure.
buyVolCurrent =
barRange > 0 ?
vol * (close - low) / barRange :
vol * 0.5
sellVolCurrent =
barRange > 0 ?
vol * (high - close) / barRange :
vol * 0.5
buyPct =
100.0 *
buyVolCurrent /
math.max(buyVolCurrent + sellVolCurrent, 1.0)
// -----------------------------------------------------------------------------
// Geçmiş bar Buy Pressure
// -----------------------------------------------------------------------------
f_buyDominant(_offset) =>
h = high[_offset]
l = low[_offset]
c = close[_offset]
v = volume[_offset]
r = h - l
b =
r > 0 ?
v * (c - l) / r :
v * 0.5
s =
r > 0 ?
v * (h - c) / r :
v * 0.5
p =
100.0 *
b /
math.max(b + s, 1.0)
not na(p) and p >= minBuyPct
// -----------------------------------------------------------------------------
// Ardışık Buy Pressure Streak
// -----------------------------------------------------------------------------
int buyPressureStreak = 0
for i = 0 to accumDays - 1
if f_buyDominant(i)
buyPressureStreak += 1
else
break
condBuyPressure =
buyPressureStreak >= buyDomDays
// -----------------------------------------------------------------------------
// Buy Pressure Score
// -----------------------------------------------------------------------------
streakComponent =
math.min(
40.0,
buyPressureStreak /
math.max(float(accumDays), 1.0) *
40.0)
buyPressureScore =
math.min(
100.0,
buyPct / 100.0 * 60.0 +
streakComponent)
// =============================================================================
// J. VOLUME ACCELERATION
// =============================================================================
shortVolMA =
ta.sma(vol, volTrendLen)
longVolMA =
ta.sma(vol, volTrendLen * 2)
volAccelerationRatio =
not na(longVolMA) and longVolMA > 0 ?
shortVolMA / longVolMA :
1.0
condVolAcceleration =
not na(shortVolMA) and
not na(longVolMA) and
shortVolMA > longVolMA * volTrendMult
// =============================================================================
// K. PRICE COMPRESSION
// =============================================================================
highestPrice =
ta.highest(high, priceRangeLen)
lowestPrice =
ta.lowest(low, priceRangeLen)
priceRangePct =
not na(lowestPrice) and
lowestPrice > 0 ?
(highestPrice - lowestPrice) /
lowestPrice *
100.0 :
na
condPriceCompression =
not na(priceRangePct) and
priceRangePct <= maxPriceMove
// =============================================================================
// L. ACCUMULATION / DISTRIBUTION / CHURN
// =============================================================================
Accumulation =
upDay and
not na(rvol) and
rvol >= 1.5 and
closeLoc >= 0.70
Distribution =
downDay and
not na(rvol) and
rvol > 1.0 and
closeLoc < 0.30 and
barRange >= atr * 0.8
dayChange =
close[1] != 0 ?
close / close[1] - 1.0 :
0.0
Churn =
upDay and
not na(rvol) and
rvol >= 1.80 and
dayChange <= 0.01 and
closeLoc < 0.60
// =============================================================================
// M. STEALTH ACCUMULATION
// =============================================================================
//
// Fiyat henüz genişlememişken:
// Buy Pressure
// + Streak
// + Volume Acceleration
// + Price Compression
//
// birlikte oluşuyor.
// =============================================================================
stealthAccumulation =
useStealthAccum and
condBuyPressure and
buyPressureStreak >= stealthMinStreak and
condPriceCompression and
condVolAcceleration and
buyPct >= minBuyPct
stealthScore = 0.0
stealthScore +=
condBuyPressure ?
30.0 :
0.0
stealthScore +=
condPriceCompression ?
20.0 :
0.0
stealthScore +=
condVolAcceleration ?
20.0 :
0.0
stealthScore +=
buyPct >= 60.0 ?
15.0 :
buyPct >= minBuyPct ?
8.0 :
0.0
stealthScore +=
buyPressureStreak >= 5 ?
15.0 :
buyPressureStreak >= 3 ?
8.0 :
0.0
stealthScore :=
math.min(100.0, stealthScore)
// =============================================================================
// N. EARLY ACCUMULATION RADAR
// =============================================================================
//
// Henüz kırılım yok.
// Henüz güçlü aday olmak zorunda değil.
// Ancak Smart Money davranışı oluşuyor.
// =============================================================================
EarlyAccumulationRadar =
useEarlyRadar and
condBuyPressure and
buyPressureStreak >= stealthMinStreak and
condPriceCompression and
condVolAcceleration and
not Distribution and
not Churn
// =============================================================================
// 3. ENTRY SCORE
// =============================================================================
// Stealth Accumulation burada ayrıca entry puanına eklenmez.
// Çünkü zaten Accumulation skorunun içinde kullanılıyor.
// Böylece double-counting azaltılır.
entryScore =
(PocketPivot10 ? 1 : PocketPivot5 ? 1 : 0) +
(Accumulation ? 1 : 0) +
(isDryUpBreakout ? 1 : 0) +
(isBullSnort ? 1 : 0) +
(isPowerUp ? 1 : 0)
scoreSynergy =
entryScore >= 3 ?
20 :
entryScore == 2 ?
10 :
0
// =============================================================================
// 4. SMART MONEY ACCUMULATION SCORE
// =============================================================================
// Yeni ağırlık:
//
// CMF benzeri akış -> 25
// OBV benzeri davranış -> 20
// High Close -> 15
// Mevcut Accumulation -> 20
// Buy Pressure -> 10
// Stealth -> 10
//
// Bu v47'nin daha basit yapısında
// mevcut Accumulation motorunu bozmadan
// yeni Smart Money davranışı ekler.
// U/D yerine burada mevcut U/D kullanılmaya devam edilir.
// Ek Smart Money motoru ayrı puanlanır.
scoreAcc =
Accumulation ?
15 :
0
scoreBuyPressure =
buyPressureScore >= 70 ?
10 :
buyPressureScore >= 55 ?
6 :
buyPressureScore >= 45 ?
3 :
0
scoreStealth =
stealthScore >= 80 ?
10 :
stealthScore >= 60 ?
7 :
stealthScore >= 40 ?
4 :
0
// =============================================================================
// 5. TARAMA ANA FİLTRESİ
// =============================================================================
baseSetup =
FullTrend and
isNearHigh and
entryScore >= 2 and
DryUpLast20 and
not na(rvol) and
rvol >= rvolThreshold and
not na(udRatio) and
udRatio >= udRatioThreshold and
volPercentile >= dynMinPctile and
isRSStrong and
avgTLVolume > minTLVolume and
todayTL > avgTLVolume * todayTlMult and
not Churn and
not Distribution
InstitutionalSetup =
onlyConfirmed ?
barstate.isconfirmed and baseSetup :
baseSetup
// =============================================================================
// 6. GELİŞTİRİLMİŞ SKOR
// =============================================================================
//
// Skorlar bilinçli şekilde yeniden dengelenmiştir.
// Smart Money'nin yeni parçaları skoru aşırı şişirmemelidir.
// =============================================================================
scoreTrend =
FullTrend ?
20 :
basicTrend ?
10 :
0
scorePP =
PocketPivot10 ?
15 :
PocketPivot5 ?
8 :
0
scoreAccum =
Accumulation ?
15 :
0
scoreBreakout =
isDryUpBreakout ?
12 :
0
scoreBS =
isBullSnort ?
8 :
0
scorePower =
isPowerUp ?
8 :
0
scorePct =
volPercentile >= dynMinPctile ?
7 :
volPercentile >= 75 ?
4 :
0
scoreUD =
not na(udRatio) and udRatio >= 1.5 ?
5 :
not na(udRatio) and udRatio >= 1.0 ?
3 :
0
scoreRS =
isRSStrong ?
4 :
0
scoreNearHigh =
isNearHigh ?
3 :
0
scoreLiquidity =
avgTLVolume > minTLVolume and
todayTL > avgTLVolume * todayTlMult ?
3 :
0
// Yeni Smart Money katmanları
scoreSmartMoney =
scoreBuyPressure +
scoreStealth
// Cezalar
scorePenalty =
(Churn ? 20 : 0) +
(Distribution ? 20 : 0) +
(not ma50DistOK ? 15 : 0)
// Ham skor
rawScore =
scoreTrend +
scorePP +
scoreAccum +
scoreBreakout +
scoreBS +
scorePower +
scorePct +
scoreUD +
scoreRS +
scoreNearHigh +
scoreLiquidity +
scoreSmartMoney +
scoreSynergy -
scorePenalty
KurulumSkoru =
math.max(
0,
math.min(
100,
math.round(rawScore)))
GucluAday =
KurulumSkoru >= scoreThreshold
// =============================================================================
// 7. ERKEN RADAR / GÜÇLÜ ADAY AYRIMI
// =============================================================================
SmartMoneyCandidate =
EarlyAccumulationRadar and
buyPressureScore >= 55 and
stealthScore >= 40
StealthCandidate =
stealthAccumulation and
stealthScore >= 60
InstitutionalCandidate =
InstitutionalSetup and
GucluAday
// =============================================================================
// 8. SCREENER ÇIKTILARI
// =============================================================================
// Ana sonuçlar
plot(
InstitutionalSetup ? 1 : 0,
title="Kurulum (0/1)",
style=plot.style_columns,
color=InstitutionalSetup ? color.green : color.gray)
plot(
KurulumSkoru,
title="Kurulum Skoru (0-100)",
style=plot.style_columns,
color=color.purple)
plot(
GucluAday ? 1 : 0,
title="Guclu Aday (0/1)",
style=plot.style_columns,
color=color.fuchsia)
// Trend
plot(
FullTrend ? 1 : 0,
title="Full Trend (0/1)",
style=plot.style_columns,
color=color.lime)
plot(
isNearHigh ? 1 : 0,
title="52H Zirveye Yakin (0/1)",
style=plot.style_columns,
color=color.orange)
// Entry
plot(
entryScore,
title="Cakisan Giris Sayisi (EntryScore)")
plot(
isDryUpBreakout ? 1 : 0,
title="Dry-Up Breakout (0/1)",
style=plot.style_columns,
color=color.yellow)
plot(
isBullSnort ? 1 : 0,
title="Bull Snort (0/1)",
style=plot.style_columns,
color=color.blue)
plot(
isPowerUp ? 1 : 0,
title="Power Volume (0/1)",
style=plot.style_columns,
color=color.aqua)
// Mevcut metrikler
plot(
udRatio,
title="U/D Volume Ratio")
plot(
volPercentile,
title="Volume Percentile (%)")
plot(
finalRS,
title="RS Skoru / Mansfield")
plot(
rvol,
title="RVOL")
plot(
todayTL,
title="Today TL Volume")
plot(
avgTLVolume,
title="Average TL Volume")
// =============================================================================
// 9. YENİ SMART MONEY SCREENER KOLONLARI
// =============================================================================
plot(
buyPct,
title="SCY Buy Pressure %",
display=display.none)
plot(
buyPressureStreak,
title="SCY Buy Pressure Streak",
display=display.none)
plot(
buyPressureScore,
title="SCY Buy Pressure Score",
display=display.none)
plot(
condBuyPressure ? 1 : 0,
title="SCY Buy Pressure Active",
display=display.none)
plot(
condVolAcceleration ? 1 : 0,
title="SCY Volume Acceleration",
display=display.none)
plot(
volAccelerationRatio,
title="SCY Volume Acceleration Ratio",
display=display.none)
plot(
priceRangePct,
title="SCY Price Compression %",
display=display.none)
plot(
condPriceCompression ? 1 : 0,
title="SCY Price Compression",
display=display.none)
plot(
stealthScore,
title="SCY Stealth Accumulation Score",
display=display.none)
plot(
stealthAccumulation ? 1 : 0,
title="SCY Stealth Accumulation",
display=display.none)
plot(
EarlyAccumulationRadar ? 1 : 0,
title="SCY Early Accumulation Radar",
display=display.none)
plot(
SmartMoneyCandidate ? 1 : 0,
title="SCY Smart Money Candidate",
display=display.none)
plot(
StealthCandidate ? 1 : 0,
title="SCY Stealth Candidate",
display=display.none)
plot(
InstitutionalCandidate ? 1 : 0,
title="SCY Institutional Candidate",
display=display.none)
// =============================================================================
// 10. ALARMLAR
// =============================================================================
alertcondition(
InstitutionalSetup,
title="SCY PRO v48 Kurumsal Kurulum",
message="{{ticker}} SCY PRO v48 kurumsal tarama şartlarını sağladı.")
alertcondition(
GucluAday,
title="SCY PRO v48 Güçlü Aday",
message="{{ticker}} SCY PRO v48 skor eşiğini geçti.")
alertcondition(
EarlyAccumulationRadar,
title="SCY PRO v48 Early Accumulation",
message="{{ticker}} erken Smart Money birikim radarı aktif.")
alertcondition(
stealthAccumulation,
title="SCY PRO v48 Stealth Accumulation",
message="{{ticker}} Stealth Accumulation aktif.")
alertcondition(
SmartMoneyCandidate,
title="SCY PRO v48 Smart Money Candidate",
message="{{ticker}} Smart Money Candidate durumuna geçti.")Editor is loading...
Leave a Comment