Dua indikator all-in-one untuk TradingView — Panel Dashboard (valuasi, Minervini Score, RRG, smart money) dan SMC (Order Blocks, FVG, Market Structure). Copy-paste langsung ke Pine Editor.
Dashboard all-in-one di sisi kanan chart TradingView. Menampilkan analisis fundamental, teknikal, dan smart money dalam satu tampilan.
Analisis pergerakan uang pintar institusi. Deteksi area akumulasi/distribusi, struktur pasar, dan celah harga yang belum terisi.
Kunjungi tradingview.com dan login ke akun Anda.
Klik tab { } di bawah chart. Hapus kode default: Ctrl+A → Delete.
Klik tombol "Copy Script" di bawah. Paste ke Pine Editor: Ctrl+V.
Klik "Add to Chart". Indikator langsung aktif di chart Anda.
// =====================================================================
// YPC Indicator System - Panel
// Build :@YPCSaham
// =====================================================================
//@version=5
indicator("YPC Indicator System - Panel", overlay=true, max_labels_count=500, format=format.price, precision=4)
// ═══════════════════════════════════════════════════════════════════════════════
// TABLE POSITION
// ═══════════════════════════════════════════════════════════════════════════════
var groupPanel = 'Tabel Position'
string table_vertical_pos = input.string('top', 'Panel position', inline='11', options=['top', 'middle', 'bottom'], group=groupPanel)
string table_horizontal_pos = input.string('right', '', inline='11', options=['left', 'center', 'right'], group=groupPanel)
// ═══════════════════════════════════════════════════════════════════════════════
// MINERVINI CRITERIA
// ═══════════════════════════════════════════════════════════════════════════════
sma50 = ta.sma(close, 50)
sma150 = ta.sma(close, 150)
sma200 = ta.sma(close, 200)
sma200_22 = sma200[22]
is_price_above_sma_150_and_200 = close > sma150 and close > sma200
c_1 = is_price_above_sma_150_and_200 ? 1 : 0
is_sma_150_above_sma_200 = sma150 > sma200
c_2 = is_sma_150_above_sma_200 ? 1 : 0
is_trending_at_least_1_month = sma200 > sma200_22
c_3 = is_trending_at_least_1_month ? 1 : 0
is_sma_50_above_sma_150_and_200 = sma50 > sma150 and sma50 > sma200
c_4 = is_sma_50_above_sma_150_and_200 ? 1 : 0
is_current_price_above_ma_50 = close > sma50
c_5 = is_current_price_above_ma_50 ? 1 : 0
high_loopback = input(260, "High Lookback Length", group="52 Week High/low")
low_loopback = input(260, "Low Lookback Length", group="52 Week High/low")
highest_price = ta.highest(high, high_loopback)
lowest_price = ta.lowest(low, low_loopback)
is_price_25_percent_above_52_weeks_low = ((close/lowest_price)-1) * 100 >= 25
c_6 = is_price_25_percent_above_52_weeks_low ? 1 : 0
show_52_week_high_low = input.bool(defval=true, title="Show 52 week highest/lowest")
plot(show_52_week_high_low ? highest_price : na, title='52 Week High', trackprice=true, color=color.orange, offset=-9999)
plot(show_52_week_high_low ? lowest_price : na, title='52 Week Low', trackprice=true, color=color.orange, offset=-9999)
is_price_within_52_high = (1-(close/highest_price)) * 100 <= 25
c_7 = is_price_within_52_high ? 1 : 0
three_month_rs = 0.4*(close/close[13])
six_month_rs = 0.2*(close/(close[26]*2))
nine_month_rs = 0.2*(close/(close[39]*3))
twelve_month_rs = 0.2*(close/(close[52]*4))
rs_rating = (three_month_rs + six_month_rs + nine_month_rs + twelve_month_rs) * 100
is_rs_rating_more_than_seventy = rs_rating > 70
c_8 = is_rs_rating_more_than_seventy ? 1 : 0
count = c_1 + c_2 + c_3 + c_4 + c_5 + c_6 + c_7 + c_8
// ═══════════════════════════════════════════════════════════════════════════════
// HEIKIN ASHI
// ═══════════════════════════════════════════════════════════════════════════════
REAL = input(false, title="Use Real Close?", group="Heikin Ashi [Improved]")
HA = input(true, title="Add Original Heikin Ashi Smoothness?", group="Heikin Ashi [Improved]")
s = input.int(1, minval=1, maxval=100, title="Candle Smoothness", group="Heikin Ashi [Improved]")
ShowAvg = input(true, title="Show Heikin Ashi Moving Average [improved]", group="Heikin Ashi Moving Average [improved]")
len = input.int(25, minval=1, maxval=500, title="Length", group="Heikin Ashi Moving Average [improved]")
close0 = (open + high + low + close) / 4
close0 := na(close0) ? nz(na) : (nz(close0) + nz(close)) / 2
open0 = float(na)
open0 := na(open0[1]) ? nz(na) : (nz(open0[s]) + nz(close0[1])) / 2
high0 = math.max(high, math.max(open0, close0))
low0 = math.min(low, math.min(open0, close0))
h = math.max(high0, low0)
l = math.min(high0, low0)
haClose = (open0 + h + l + close0) / 4
haOpen = float(na)
haOpen := na(haOpen[1]) ? (open0 + close0) / 2 : (nz(haOpen[1]) + nz(haClose[1])) / 2
haHigh = math.max(h, math.max(haOpen, haClose))
haLow = math.min(l, math.min(haOpen, haClose))
o_ = HA ? haOpen : open0
h_ = HA ? haHigh : h
l_ = HA ? haLow : l
c_ = HA ? (REAL ? close : haClose) : (REAL ? close : close0)
BODY = close0 > open0 ? color.lime : color.red
BORDER = close0 > open0 ? color.lime : color.red
if HA
BODY := haClose > haOpen ? color.lime : color.red
BORDER := haClose > haOpen ? color.lime : color.red
avg = math.avg(high0, low0, haHigh, haLow, c_)
HA_movingAverage = ta.wma(avg, len)
col = HA_movingAverage > HA_movingAverage[1] ? #f0ce11 : #eb0b0b
plot(ShowAvg ? HA_movingAverage : na, color=col, title="Heikin Ashi Moving Average [improved]")
// ═══════════════════════════════════════════════════════════════════════════════
// ALPHAX SNIPER – MULTI CONFLUENCE ENTRY SIGNALS WITH ATR TP/SL
// ═══════════════════════════════════════════════════════════════════════════════
// Trend Engine
trendFastLen = input.int(8, "Trend Fast EMA", minval=3, maxval=30, group="Trend Engine")
trendMedLen = input.int(21, "Trend Medium EMA", minval=10, maxval=50, group="Trend Engine")
trendSlowLen = input.int(55, "Trend Slow EMA", minval=30, maxval=100, group="Trend Engine")
trendAnchorLen = input.int(200, "Trend Anchor EMA", minval=100, maxval=500, group="Trend Engine")
showTrendEMAs = input.bool(false, "Show Trend EMAs", group="Trend Engine")
showAnchorEMA = input.bool(true, "Show Anchor EMA (200)", group="Trend Engine")
// Sniper Entry
rsiLen = input.int(9, "RSI Period", minval=5, maxval=20, group="Sniper Entry")
rsiBullZone = input.float(48, "RSI Bull Pullback ≤", minval=25, maxval=55, step=1, group="Sniper Entry")
rsiBearZone = input.float(52, "RSI Bear Pullback ≥", minval=45, maxval=75, step=1, group="Sniper Entry")
stochLen = input.int(14, "Stoch Length", minval=5, maxval=21, group="Sniper Entry")
stochSmooth = input.int(3, "Stoch Smooth", minval=1, maxval=5, group="Sniper Entry")
stochOB = input.float(75, "Stoch Overbought", minval=65, maxval=95, step=1, group="Sniper Entry")
stochOS = input.float(25, "Stoch Oversold", minval=5, maxval=35, step=1, group="Sniper Entry")
// Precision Filters
useVolFilter = input.bool(false, "Require Volume Confirmation", group="Precision Filters")
volMultiplier2 = input.float(0.6, "Min Volume vs 20-SMA", minval=0.3, maxval=2.0, step=0.1, group="Precision Filters")
useDispFilter = input.bool(true, "Require Candle Strength", group="Precision Filters")
minBodyRatio = input.float(0.25, "Min Body/Range Ratio", minval=0.1, maxval=0.8, step=0.05, group="Precision Filters")
useMacdFilter = input.bool(false, "Require MACD Alignment", group="Precision Filters")
useAtrFilter = input.bool(false, "Filter Low Volatility", group="Precision Filters")
atrMinPct = input.float(0.02, "Min ATR % of Price", minval=0.01, maxval=0.1, step=0.005, group="Precision Filters")
cooldownBars = input.int(8, "Signal Cooldown (bars)", minval=1, maxval=30, group="Precision Filters")
// TP / SL
showTPSL = input.bool(true, "Show TP/SL Levels", group="TP / SL")
atrTPSLLen = input.int(14, "ATR Period for TP/SL", minval=5, maxval=30, group="TP / SL")
slMultiplier = input.float(1.5, "Stop Loss ATR Multiple", minval=0.5, maxval=4.0, step=0.1, group="TP / SL")
tp1Multiplier = input.float(1.5, "TP1 ATR Multiple", minval=0.5, maxval=4.0, step=0.1, group="TP / SL")
tp2Multiplier = input.float(3.0, "TP2 ATR Multiple", minval=1.0, maxval=8.0, step=0.1, group="TP / SL")
tp3Multiplier = input.float(5.0, "TP3 ATR Multiple", minval=2.0, maxval=12.0, step=0.1, group="TP / SL")
// Sniper Zones
showSniperZones = input.bool(true, "Show Sniper Kill Zones", group="Sniper Zones")
zoneExtendBars = input.int(6, "Zone Forward Extension", minval=2, maxval=20, group="Sniper Zones")
// Session Filter
useSessionFilter = input.bool(false, "Enable Session Filter", group="Session Filter")
sessionLondonOpen = input.int(8, "London Open (GMT Hour)", minval=0, maxval=23, group="Session Filter")
sessionNYOpen = input.int(13, "NY Open (GMT Hour)", minval=0, maxval=23, group="Session Filter")
sessionNYClose = input.int(21, "NY Close (GMT Hour)", minval=0, maxval=23, group="Session Filter")
sessionAsiaOpen = input.int(0, "Asia Open (GMT Hour)", minval=0, maxval=23, group="Session Filter")
sessionAsiaClose = input.int(8, "Asia Close (GMT Hour)", minval=0, maxval=23, group="Session Filter")
// Appearance
labelSizeInput = input.string("Small", "Label Size", options=["Tiny","Small","Normal"], group="Appearance")
showTrail = input.bool(true, "Show Trailing Stop", group="Appearance")
trailATRMult = input.float(2.0, "Trail ATR Multiple", minval=0.5, maxval=5.0, step=0.1, group="Appearance")
// Colors
colBullPrimary = input.color(#c8e624, "Bull Primary", group="Colors")
colBullBright = input.color(#d4f03a, "Bull Bright", group="Colors")
colBullDim = input.color(#9ab81c, "Bull Dim", group="Colors")
colBearPrimary = input.color(#ff1744, "Bear Primary", group="Colors")
colBearBright = input.color(#ff5252, "Bear Bright", group="Colors")
colBearDim = input.color(#d50032, "Bear Dim", group="Colors")
colNeutral = input.color(#555555, "Neutral", group="Colors")
colNeutralLight = input.color(#888888, "Neutral Light", group="Colors")
colTextLight = input.color(#cccccc, "Dashboard Text", group="Colors")
colDashBg = input.color(#1a1a1a, "Dashboard Background", group="Colors")
colTrailBull = input.color(#c8e624, "Trail Stop Bull", group="Colors")
colTrailBear = input.color(#ff1744, "Trail Stop Bear", group="Colors")
colTPLine = input.color(#c8e624, "TP Line Color", group="Colors")
colSLLine = input.color(#ff1744, "SL Line Color", group="Colors")
colZoneBull = input.color(#c8e624, "Sniper Zone Bull", group="Colors")
colZoneBear = input.color(#ff1744, "Sniper Zone Bear", group="Colors")
colRibbonBull = input.color(#9ab81c, "Ribbon Fill Bull", group="Colors")
colRibbonBear = input.color(#d50032, "Ribbon Fill Bear", group="Colors")
colEmaFast = input.color(#c8e624, "Fast EMA", group="Colors")
colEmaMed = input.color(#888888, "Medium EMA", group="Colors")
colEmaSlow = input.color(#555555, "Slow EMA", group="Colors")
colEmaAnchor = input.color(#555555, "Anchor EMA", group="Colors")
colBullLabelBg = input.color(#c8e624, "Bull Label Background", group="Colors")
colBearLabelBg = input.color(#ff1744, "Bear Label Background", group="Colors")
colBullLabelTxt = input.color(#1a1a1a, "Bull Label Text", group="Colors")
colBearLabelTxt = input.color(#ffffff, "Bear Label Text", group="Colors")
// Dashboard
showDash = input.bool(true, "Show Dashboard", group="Dashboard")
dashPos = input.string("Top Right", "Position", options=["Top Left","Top Right","Bottom Left","Bottom Right"], group="Dashboard")
dashSizeInput = input.string("Small", "Text Size", options=["Tiny","Small","Normal"], group="Dashboard")
// Helpers
getLabelSize(sz) =>
switch sz
"Tiny" => size.tiny
"Small" => size.small
"Normal" => size.normal
getDashPos(p) =>
switch p
"Top Left" => position.top_left
"Top Right" => position.top_right
"Bottom Left" => position.bottom_left
"Bottom Right" => position.bottom_right
labelSize = getLabelSize(labelSizeInput)
dashTextSize = getLabelSize(dashSizeInput)
// Trend Engine
emaFast = ta.ema(close, trendFastLen)
emaMed = ta.ema(close, trendMedLen)
emaSlow = ta.ema(close, trendSlowLen)
emaAnchor = ta.ema(close, trendAnchorLen)
ribbonBull = emaFast > emaMed and emaMed > emaSlow
ribbonBear = emaFast < emaMed and emaMed < emaSlow
fastSlopeUp = emaFast > emaFast[1] and emaFast[1] > emaFast[2]
fastSlopeDown = emaFast < emaFast[1] and emaFast[1] < emaFast[2]
medSlopeUp = emaMed > emaMed[1]
medSlopeDown = emaMed < emaMed[1]
aboveAnchor = close > emaAnchor
belowAnchor = close < emaAnchor
trendScore = (ribbonBull ? 1 : ribbonBear ? -1 : 0) +
(fastSlopeUp ? 1 : fastSlopeDown ? -1 : 0) +
(medSlopeUp ? 1 : medSlopeDown ? -1 : 0) +
(aboveAnchor ? 1 : belowAnchor ? -1 : 0)
strongBullTrend = trendScore >= 3
strongBearTrend = trendScore <= -3
moderateBullTrend = trendScore >= 2
moderateBearTrend = trendScore <= -2
ribbonColor = ribbonBull ? colRibbonBull : ribbonBear ? colRibbonBear : colNeutral
plot(showTrendEMAs ? emaFast : na, "Fast EMA", color=showTrendEMAs ? color.new(colEmaFast, ribbonBull ? 30 : ribbonBear ? 80 : 60) : na, linewidth=1)
plot(showTrendEMAs ? emaMed : na, "Medium EMA", color=showTrendEMAs ? color.new(colEmaMed, 30) : na, linewidth=1)
plot(showTrendEMAs ? emaSlow : na, "Slow EMA", color=showTrendEMAs ? color.new(colEmaSlow, 30) : na, linewidth=2)
plot(showAnchorEMA ? emaAnchor : na, "Anchor EMA", color=showAnchorEMA ? color.new(colEmaAnchor, 50) : na, linewidth=3, style=plot.style_line)
fastPlot = plot(showTrendEMAs ? emaFast : na, display=display.none)
slowPlot = plot(showTrendEMAs ? emaSlow : na, display=display.none)
fill(fastPlot, slowPlot, color=showTrendEMAs ? color.new(ribbonColor, 88) : na, title="Trend Ribbon")
// Oscillators
rsiVal = ta.rsi(close, rsiLen)
rsiPullUp = rsiVal <= rsiBullZone and rsiVal > 20
rsiPullDn = rsiVal >= rsiBearZone and rsiVal < 80
rsiRecoverUp = rsiVal > rsiBullZone and rsiVal[1] <= rsiBullZone
rsiRecoverDn = rsiVal < rsiBearZone and rsiVal[1] >= rsiBearZone
stochK = ta.stoch(close, high, low, stochLen)
stochD = ta.sma(stochK, stochSmooth)
stochCrossUp = ta.crossover(stochK, stochD) and stochK < stochOB
stochCrossDn = ta.crossunder(stochK, stochD) and stochK > stochOS
stochFromOS = stochK[1] < stochOS and stochK > stochOS
stochFromOB = stochK[1] > stochOB and stochK < stochOB
[macdLine, signalLine, macdHist] = ta.macd(close, 12, 26, 9)
macdBullish = macdLine > signalLine
macdBearish = macdLine < signalLine
macdMomUp = macdHist > macdHist[1]
macdMomDn = macdHist < macdHist[1]
macdBullAlign = macdBullish and macdMomUp
macdBearAlign = macdBearish and macdMomDn
// Volatility & Volume
atrVal = ta.atr(14)
atrPct = atrVal / close * 100
atrTPSL = ta.atr(atrTPSLLen)
volSMA = ta.sma(volume, 20)
volRatio = volSMA > 0 ? volume / volSMA : 1.0
volOK = not useVolFilter or volRatio >= volMultiplier2
atrOK = not useAtrFilter or atrPct >= atrMinPct
candleBody = math.abs(close - open)
candleRange = high - low
bodyRatio = candleRange > 0 ? candleBody / candleRange : 0
bullCandle = close > open
bearCandle = close < open
strongBody = bodyRatio >= minBodyRatio
candleOK = not useDispFilter or strongBody
// Session Filter
currentHour = hour(time, "UTC")
inLondon = currentHour >= sessionLondonOpen and currentHour < sessionNYClose
inNY = currentHour >= sessionNYOpen and currentHour < sessionNYClose
inAsia = currentHour >= sessionAsiaOpen and currentHour < sessionAsiaClose
inKillZone = inLondon or inNY
sessionOK = not useSessionFilter or inKillZone
sessionQuality = inNY and inLondon ? 100 : inNY ? 85 : inLondon ? 80 : inAsia ? 30 : 20
// Multi-Timeframe Confluence
htfEmaFast = ta.ema(close, trendFastLen * 5)
htfEmaSlow = ta.ema(close, trendSlowLen * 5)
htfBullish = htfEmaFast > htfEmaSlow
htfBearish = htfEmaFast < htfEmaSlow
// Sniper Confluence Scoring
emaDist = math.abs(close - emaAnchor) / emaAnchor * 100
emaExtended = emaDist > 1.5
emaVeryExtended = emaDist > 3.0
var int ribbonBullBars = 0
var int ribbonBearBars = 0
ribbonBullBars := ribbonBull ? ribbonBullBars + 1 : 0
ribbonBearBars := ribbonBear ? ribbonBearBars + 1 : 0
trendAged = ribbonBullBars > 80 or ribbonBearBars > 80
trendVeryAged = ribbonBullBars > 150 or ribbonBearBars > 150
calcBullScore() =>
float s = 0.0
s += strongBullTrend ? 30.0 : moderateBullTrend ? 20.0 : trendScore >= 1 ? 10.0 : 0.0
s += rsiRecoverUp ? 20.0 : rsiPullUp ? 12.0 : 0.0
s += stochCrossUp and stochFromOS ? 15.0 : stochCrossUp ? 12.0 : stochFromOS ? 8.0 : 0.0
s += useMacdFilter ? (macdBullAlign ? 10.0 : macdBullish ? 5.0 : 0.0) : 10.0
s += volRatio > 1.5 ? 10.0 : volRatio > 1.0 ? 7.0 : volOK ? 4.0 : 0.0
s += bullCandle and strongBody ? 5.0 : bullCandle ? 2.0 : 0.0
s += htfBullish ? 5.0 : 0.0
s += sessionQuality >= 80 ? 5.0 : sessionQuality >= 50 ? 3.0 : 0.0
s -= rsiVal > 75 ? 15.0 : rsiVal > 68 ? 8.0 : 0.0
s -= not atrOK ? 10.0 : 0.0
s -= inAsia ? 8.0 : 0.0
s -= emaVeryExtended ? 20.0 : emaExtended ? 10.0 : 0.0
s -= trendVeryAged ? 18.0 : trendAged ? 10.0 : 0.0
math.max(0.0, math.min(100.0, s))
calcBearScore() =>
float s = 0.0
s += strongBearTrend ? 30.0 : moderateBearTrend ? 20.0 : trendScore <= -1 ? 10.0 : 0.0
s += rsiRecoverDn ? 20.0 : rsiPullDn ? 12.0 : 0.0
s += stochCrossDn and stochFromOB ? 15.0 : stochCrossDn ? 12.0 : stochFromOB ? 8.0 : 0.0
s += useMacdFilter ? (macdBearAlign ? 10.0 : macdBearish ? 5.0 : 0.0) : 10.0
s += volRatio > 1.5 ? 10.0 : volRatio > 1.0 ? 7.0 : volOK ? 4.0 : 0.0
s += bearCandle and strongBody ? 5.0 : bearCandle ? 2.0 : 0.0
s += htfBearish ? 5.0 : 0.0
s += sessionQuality >= 80 ? 5.0 : sessionQuality >= 50 ? 3.0 : 0.0
s -= rsiVal < 25 ? 15.0 : rsiVal < 32 ? 8.0 : 0.0
s -= not atrOK ? 10.0 : 0.0
s -= inAsia ? 8.0 : 0.0
s -= emaVeryExtended ? 20.0 : emaExtended ? 10.0 : 0.0
s -= trendVeryAged ? 18.0 : trendAged ? 10.0 : 0.0
math.max(0.0, math.min(100.0, s))
bullScore = calcBullScore()
bearScore = calcBearScore()
// Signal Generation
mildBullTrend = trendScore >= 1
mildBearTrend = trendScore <= -1
bullTrigger = (rsiRecoverUp or stochCrossUp or stochFromOS) and bullCandle and mildBullTrend
bearTrigger = (rsiRecoverDn or stochCrossDn or stochFromOB) and bearCandle and mildBearTrend
bullFiltered = bullTrigger and volOK and atrOK and candleOK and sessionOK
bearFiltered = bearTrigger and volOK and atrOK and candleOK and sessionOK
bullGated = bullFiltered and (not useMacdFilter or macdBullish)
bearGated = bearFiltered and (not useMacdFilter or macdBearish)
var int lastBullBar = -999
var int lastBearBar = -999
bullCoolOK = bar_index - lastBullBar >= cooldownBars
bearCoolOK = bar_index - lastBearBar >= cooldownBars
bullAAA = bullGated and bullScore >= 65 and bullCoolOK
bullAA = bullGated and bullScore >= 45 and bullScore < 65 and bullCoolOK
bullA = bullGated and bullScore >= 30 and bullScore < 45 and bullCoolOK
bearAAA = bearGated and bearScore >= 65 and bearCoolOK
bearAA = bearGated and bearScore >= 45 and bearScore < 65 and bearCoolOK
bearA = bearGated and bearScore >= 30 and bearScore < 45 and bearCoolOK
bullSignal = bullAAA or bullAA or bullA
bearSignal = bearAAA or bearAA or bearA
if bullSignal
lastBullBar := bar_index
if bearSignal
lastBearBar := bar_index
bullTier = bullAAA ? "AAA" : bullAA ? "AA" : "A"
bearTier = bearAAA ? "AAA" : bearAA ? "AA" : "A"
// TP / SL Calculation
var float activeSL = na
var float activeTP1 = na
var float activeTP2 = na
var float activeTP3 = na
var float activeEntry = na
var int activeDir = 0
var int activeBar = na
var bool tp1Hit = false
var bool tp2Hit = false
var bool tp3Hit = false
var bool slHit = false
if bullSignal
activeEntry := close
activeSL := close - atrTPSL * slMultiplier
activeTP1 := close + atrTPSL * tp1Multiplier
activeTP2 := close + atrTPSL * tp2Multiplier
activeTP3 := close + atrTPSL * tp3Multiplier
activeDir := 1
activeBar := bar_index
tp1Hit := false
tp2Hit := false
tp3Hit := false
slHit := false
if bearSignal
activeEntry := close
activeSL := close + atrTPSL * slMultiplier
activeTP1 := close - atrTPSL * tp1Multiplier
activeTP2 := close - atrTPSL * tp2Multiplier
activeTP3 := close - atrTPSL * tp3Multiplier
activeDir := -1
activeBar := bar_index
tp1Hit := false
tp2Hit := false
tp3Hit := false
slHit := false
if activeDir == 1 and not na(activeEntry)
if high >= activeTP1 and not tp1Hit
tp1Hit := true
if high >= activeTP2 and not tp2Hit
tp2Hit := true
if high >= activeTP3 and not tp3Hit
tp3Hit := true
if low <= activeSL and not slHit
slHit := true
activeDir := 0
if activeDir == -1 and not na(activeEntry)
if low <= activeTP1 and not tp1Hit
tp1Hit := true
if low <= activeTP2 and not tp2Hit
tp2Hit := true
if low <= activeTP3 and not tp3Hit
tp3Hit := true
if high >= activeSL and not slHit
slHit := true
activeDir := 0
// Trailing Stop
trailATR = ta.atr(14) * trailATRMult
var float trailStop = na
if activeDir == 1
newTrail = close - trailATR
if na(trailStop) or newTrail > trailStop
trailStop := newTrail
if low < trailStop
activeDir := 0
trailStop := na
else if activeDir == -1
newTrail = close + trailATR
if na(trailStop) or newTrail < trailStop
trailStop := newTrail
if high > trailStop
activeDir := 0
trailStop := na
else
trailStop := na
plot(showTrail and not na(trailStop) ? trailStop : na, "Trailing Stop", color=activeDir == 1 ? color.new(colTrailBull, 40) : color.new(colTrailBear, 40), linewidth=1, style=plot.style_steplinebr)
// TP/SL Plotting
var line slLine = na
var line tp1Line = na
var line tp2Line = na
var line tp3Line = na
var label slLabel = na
var label tp1Label = na
var label tp2Label = na
var label tp3Label = na
if showTPSL and (bullSignal or bearSignal) and not na(activeEntry)
if not na(slLine)
line.delete(slLine)
if not na(tp1Line)
line.delete(tp1Line)
if not na(tp2Line)
line.delete(tp2Line)
if not na(tp3Line)
line.delete(tp3Line)
if not na(slLabel)
label.delete(slLabel)
if not na(tp1Label)
label.delete(tp1Label)
if not na(tp2Label)
label.delete(tp2Label)
if not na(tp3Label)
label.delete(tp3Label)
extendEnd = bar_index + 25
slLine := line.new(bar_index, activeSL, extendEnd, activeSL, color=color.new(colSLLine, 30), style=line.style_dashed, width=1)
slLabel := label.new(extendEnd, activeSL, text="SL " + str.tostring(activeSL, format.mintick), yloc=yloc.price, color=color.new(colSLLine, 100), textcolor=colSLLine, size=size.tiny, style=label.style_none)
tp1Line := line.new(bar_index, activeTP1, extendEnd, activeTP1, color=color.new(colTPLine, 50), style=line.style_dashed, width=1)
tp1Label := label.new(extendEnd, activeTP1, text="TP1 " + str.tostring(activeTP1, format.mintick), yloc=yloc.price, color=color.new(colTPLine, 100), textcolor=color.new(colTPLine, 30), size=size.tiny, style=label.style_none)
tp2Line := line.new(bar_index, activeTP2, extendEnd, activeTP2, color=color.new(colTPLine, 30), style=line.style_dashed, width=1)
tp2Label := label.new(extendEnd, activeTP2, text="TP2 " + str.tostring(activeTP2, format.mintick), yloc=yloc.price, color=color.new(colTPLine, 100), textcolor=colTPLine, size=size.tiny, style=label.style_none)
tp3Line := line.new(bar_index, activeTP3, extendEnd, activeTP3, color=color.new(colTPLine, 15), style=line.style_dashed, width=1)
tp3Label := label.new(extendEnd, activeTP3, text="TP3 " + str.tostring(activeTP3, format.mintick), yloc=yloc.price, color=color.new(colTPLine, 100), textcolor=colBullBright, size=size.tiny, style=label.style_none)
// Sniper Kill Zones
if showSniperZones and bullSignal
zoneTop = high
zoneBtm = math.min(low, activeSL)
box.new(bar_index, zoneTop, bar_index + zoneExtendBars, zoneBtm, border_color=color.new(colZoneBull, 70), bgcolor=color.new(colZoneBull, 94), border_width=1, border_style=line.style_dotted)
if showSniperZones and bearSignal
zoneTop = math.max(high, activeSL)
zoneBtm = low
box.new(bar_index, zoneTop, bar_index + zoneExtendBars, zoneBtm, border_color=color.new(colZoneBear, 70), bgcolor=color.new(colZoneBear, 94), border_width=1, border_style=line.style_dotted)
// Signal Labels
if bullSignal
scoreText = str.tostring(bullScore, "#")
bgClr = bullAAA ? color.new(colBullPrimary, 0) : bullAA ? color.new(colBullPrimary, 30) : color.new(colBullDim, 55)
label.new(bar_index, low, text="▲ " + bullTier + " (" + scoreText + ")", yloc=yloc.belowbar, color=bgClr, textcolor=colBullLabelTxt, size=labelSize, style=label.style_label_up)
if bearSignal
scoreText = str.tostring(bearScore, "#")
bgClr = bearAAA ? color.new(colBearPrimary, 0) : bearAA ? color.new(colBearPrimary, 30) : color.new(colBearDim, 55)
label.new(bar_index, high, text="▼ " + bearTier + " (" + scoreText + ")", yloc=yloc.abovebar, color=bgClr, textcolor=colBearLabelTxt, size=labelSize, style=label.style_label_down)
// Exit Signals
if activeDir == 1 and tp1Hit and not tp1Hit[1]
label.new(bar_index, high, text="TP1 ✓", yloc=yloc.abovebar, color=color.new(colBullDim, 100), textcolor=colBullDim, size=size.tiny, style=label.style_none)
if activeDir == 1 and tp2Hit and not tp2Hit[1]
label.new(bar_index, high, text="TP2 ✓", yloc=yloc.abovebar, color=color.new(colBullPrimary, 100), textcolor=colBullPrimary, size=size.tiny, style=label.style_none)
if activeDir == 1 and tp3Hit and not tp3Hit[1]
label.new(bar_index, high, text="TP3 ✓", yloc=yloc.abovebar, color=color.new(colBullBright, 100), textcolor=colBullBright, size=size.tiny, style=label.style_none)
if activeDir == -1 and tp1Hit and not tp1Hit[1]
label.new(bar_index, low, text="TP1 ✓", yloc=yloc.belowbar, color=color.new(colBullDim, 100), textcolor=colBullDim, size=size.tiny, style=label.style_none)
if activeDir == -1 and tp2Hit and not tp2Hit[1]
label.new(bar_index, low, text="TP2 ✓", yloc=yloc.belowbar, color=color.new(colBullPrimary, 100), textcolor=colBullPrimary, size=size.tiny, style=label.style_none)
if activeDir == -1 and tp3Hit and not tp3Hit[1]
label.new(bar_index, low, text="TP3 ✓", yloc=yloc.belowbar, color=color.new(colBullBright, 100), textcolor=colBullBright, size=size.tiny, style=label.style_none)
if slHit and not slHit[1]
slY = activeEntry > activeSL ? low : high
slYloc = activeEntry > activeSL ? yloc.belowbar : yloc.abovebar
label.new(bar_index, slY, text="SL ✕", yloc=slYloc, color=color.new(colBearPrimary, 100), textcolor=colBearBright, size=size.tiny, style=label.style_none)
// ═══════════════════════════════════════════════════════════════════════════════
// PIVOT POINTS
// ═══════════════════════════════════════════════════════════════════════════════
i_res = input.timeframe("W", "Choose the timeframe for pivots calculation", options=["1", "2", "3", "5", "15", "30", "45", "60", "120", "180", "240", "360", "480", "720", "D", "W", "M"], group="Pivot Points Settings")
styleOption = input.string("solid (─)", title="Line Style", options=["solid (─)", "dotted (┈)", "dashed (╌)", "arrow left (←)", "arrow right (→)", "arrows both (↔)"], group="Pivot Points Settings")
lineStyleNew = styleOption == "dotted (┈)" ? line.style_dotted :
styleOption == "dashed (╌)" ? line.style_dashed :
styleOption == "arrow left (←)" ? line.style_arrow_left :
styleOption == "arrow right (→)" ? line.style_arrow_right :
styleOption == "arrows both (↔)" ? line.style_arrow_both : line.style_solid
labelDistance = input.int(15, "Labels Distance From Price", group="Pivot Points Settings")
hideLabels = input.bool(false, title="Hide Pivot Labels", group="Pivot Points Settings")
plotPivotPoints = input.bool(true, title="Show Current Pivot Points", group="Pivot Points Settings")
oldPivotPoints = input.bool(false, title="Show Old Pivot Points", group="Pivot Points Settings")
showTopBottom = input.bool(false, title="Show Last High and Low", group="Pivot Points Settings")
mainPivotColor = input.color(color.new(#1df10e, 0), "Main Pivot Color", inline="Main Pivot Color", group="Pivot Points Settings")
Val_high = request.security(syminfo.tickerid, i_res, high[1])
Val_low = request.security(syminfo.tickerid, i_res, low[1])
dclose = request.security(syminfo.tickerid, i_res, close[1])
PivotPoint = (Val_high + Val_low + dclose) / 3
R1 = PivotPoint * 2 - Val_low
R2 = PivotPoint + (Val_high - Val_low)
R3 = PivotPoint * 2 + (Val_high - 2 * Val_low)
R4 = PivotPoint * 3 + (Val_high - 3 * Val_low)
R5 = PivotPoint * 4 + (Val_high - 4 * Val_low)
S1 = PivotPoint * 2 - Val_high
S2 = PivotPoint - (Val_high - Val_low)
S3 = PivotPoint * 2 - (2 * Val_high - Val_low)
S4 = PivotPoint * 3 - (3 * Val_high - Val_low)
S5 = PivotPoint * 4 - (4 * Val_high - Val_low)
if hideLabels == false
if showTopBottom == true
l0 = label.new(bar_index+labelDistance+labelDistance, Val_high, str.tostring(math.round_to_mintick(Val_high)) + " is Last Candle High at " + i_res, color=#00000000, textcolor=color.green, style=label.style_label_left, size=size.normal)
l10 = label.new(bar_index+labelDistance+labelDistance, Val_low, str.tostring(math.round_to_mintick(Val_low)) + " is Last Candle Low at " + i_res, color=#00000000, textcolor=color.red, style=label.style_label_left, size=size.normal)
label.delete(l0[1])
label.delete(l10[1])
// ═══════════════════════════════════════════════════════════════════════════════
// INSTITUTIONAL ACTIVITY ANALYSIS
// ═══════════════════════════════════════════════════════════════════════════════
var float volMultiplier = input.float(2.0, "Volume Spike Threshold", minval=1.0, maxval=5.0, step=0.1)
var int smoothingPeriod = input.int(14, "Smoothing Period", minval=5, maxval=50)
var float priceThreshold = input.float(1.5, "Price Movement Threshold", minval=0.5, maxval=3.0, step=0.1)
float volumeSMA = ta.sma(volume, smoothingPeriod)
float volumeStdDev = ta.stdev(volume, smoothingPeriod)
float volumeThreshold = volumeSMA + (volumeStdDev * volMultiplier)
float hlRange = high - low
float hlRangeSMA = ta.sma(hlRange, smoothingPeriod)
float priceVolatility = hlRange / hlRangeSMA
float smfi = 0.0
if close > open
smfi := volume * (close - low) / (high - low)
else
smfi := volume * (close - high) / (high - low)
float smfiSMA = ta.sma(smfi, smoothingPeriod)
float accDist = ta.accdist
float accDistSMA = ta.sma(accDist, smoothingPeriod)
float accDistSlope = (accDist - accDistSMA) / accDistSMA * 100
bool volumeSpike = volume > volumeThreshold
bool significantMove = priceVolatility > priceThreshold and volume > volumeThreshold
alertcondition(volumeSpike, "Volume Spike Alert", "Unusual volume detected")
alertcondition(significantMove, "Significant Move Alert", "Price movement with high volume detected")
// ═══════════════════════════════════════════════════════════════════════════════
// VALUATION & FINANCIAL DATA
// ═══════════════════════════════════════════════════════════════════════════════
USR_VAL = input.bool(false, title='Use all user data?', group="5Y Valuation")
USER_REV = input.bool(false, title='', inline="01", group="5Y Valuation")
THIS_YEAR_REV = input.float(10, title="This year revenue ($B)", group="5Y Valuation", inline="01")*1000000000
USER_REVG = input.bool(false, title='', inline="02", group="5Y Valuation")
REV_CAGR_5Y = input.int(5, title="5Y Revenue CAGR (%)", inline="02", tooltip='Average yearly revenue increase anticipated over the next 5 years', group="5Y Valuation")/100
USER_PMRG = input.bool(false, title='', inline="03", group="5Y Valuation")
PRF_MRG_5Y = input.int(10, title='5Y Profit Margin (%)', inline="03", tooltip='Predicted Net Profit Margin in the fifth year', group="5Y Valuation")/100
USER_PE = input.bool(false, title='', inline="04", group="5Y Valuation")
PE_5Y = input.int(25, title='5Y PE Ratio', inline="04", tooltip='Expected PE ratio in the 5th year (Exit PE multiple)', group="5Y Valuation")
USER_SHO = input.bool(false, title='', inline="05", group="5Y Valuation")
SHARE_OUT = input.float(1, title="Shares outstanding (B)", inline="05", group="5Y Valuation")*1000000000
USER_SBB = input.bool(false, title='', inline="06", group="5Y Valuation")
BBR = input.float(2.5, title="Share reduction per year (%)", inline="06", tooltip='Average annual buyback rate in percentage', group="5Y Valuation")/100
TOT_REV = USR_VAL or USER_REV ? THIS_YEAR_REV : nz(request.financial(syminfo.tickerid, "TOTAL_REVENUE", "FY", ignore_invalid_symbol=true))
GRS_MRG = USR_VAL or USER_PMRG ? PRF_MRG_5Y : nz(request.financial(syminfo.tickerid, "NET_MARGIN", "FY", ignore_invalid_symbol=true))/100
SH_OUT = USR_VAL or USER_SHO ? SHARE_OUT : nz(request.financial(syminfo.tickerid, "TOTAL_SHARES_OUTSTANDING", "FY", ignore_invalid_symbol=true))
BB_YLD = USR_VAL or USER_SBB ? BBR : nz(request.financial(syminfo.tickerid, "BUYBACK_YIELD", "FY", ignore_invalid_symbol=true))/100
DIV_Y = nz(request.financial(syminfo.tickerid, "DIVIDENDS_YIELD", "FQ", ignore_invalid_symbol=true))
PE_FW = USR_VAL or USER_PE ? PE_5Y : nz(request.financial(syminfo.tickerid, "PRICE_EARNINGS_FORWARD", "FY", ignore_invalid_symbol=true))
REV_GR = USR_VAL or USER_REVG ? REV_CAGR_5Y : nz(request.financial(syminfo.tickerid, "REVENUE_ONE_YEAR_GROWTH", "FY", ignore_invalid_symbol=true))/100
REV_GRW = (REV_GR + REV_GR[1] + REV_GR[2] + REV_GR[3] + REV_GR[4])/5
DIS_R = input.float(10, minval=1, title='Dicount Rate (%)', group="5Y Valuation")
VAL1 = TOT_REV * (math.pow(1+REV_GRW,5) * math.abs(GRS_MRG) * (math.abs(PE_FW))) / (SH_OUT * (math.pow(1-BB_YLD,5)))
VAL = VAL1 / math.pow((1+(DIS_R)/100),5)
MGN_SF = 100*(VAL-close)/VAL
ROA = request.financial(syminfo.tickerid, "RETURN_ON_ASSETS", "FY")
ROE = request.financial(syminfo.tickerid, "RETURN_ON_EQUITY", "FY")
ROIC = request.financial(syminfo.tickerid, "RETURN_ON_INVESTED_CAPITAL", "FY")
EPSt = request.financial(syminfo.tickerid, "EARNINGS_PER_SHARE", "TTM")
TSO = request.financial(syminfo.tickerid, "TOTAL_SHARES_OUTSTANDING", "FQ")
TR = request.financial(syminfo.tickerid, "TOTAL_REVENUE", "FY")
Cash = request.financial(syminfo.tickerid, "FREE_CASH_FLOW", "FY")/1000000
DTE = request.financial(syminfo.tickerid, "DEBT_TO_EQUITY", "FY")
PEGratio = request.financial(syminfo.tickerid, "PEG_RATIO", "FY")
EnterpriseValtoEBITDA = request.financial(syminfo.tickerid, "ENTERPRISE_VALUE_EBITDA", "FY")
EBITDA = request.financial(syminfo.tickerid, "EBITDA", "FY")
BV = request.financial(syminfo.tickerid, "BOOK_VALUE_PER_SHARE", "FQ")
PriceEarningsRatio = close/EPSt
MarketCap = (TSO*close)/1000000000000
PriceBookValueRatio = close/BV
f_intrabar(_src, _res) =>
var int _barNo = 0
var float _value = na
if ta.change(time(_res))
_value := 0
_value += _src
intraBarVolume = request.security(syminfo.tickerid, '1', f_intrabar(volume, 'D'))
High = request.security(syminfo.tickerid, "D", high)
Low = request.security(syminfo.tickerid, "D", low)
Avg = request.security(syminfo.tickerid, "D", avg)
// ═══════════════════════════════════════════════════════════════════════════════
// TREND - SESSION & VOLUME ANALYSIS
// ═══════════════════════════════════════════════════════════════════════════════
InSession(sessionTimes) =>
not na(time(timeframe.period, sessionTimes))
session = input.session("0900-1600", title="Session", group="Trend Timeframe")
timeframe = input.timeframe("D", title="Timeframe")
ptcr = request.security("USI:PCC", "", close, lookahead=barmerge.lookahead_on)
vol = request.security(syminfo.ticker, timeframe, volume, lookahead=barmerge.lookahead_on)
greencandle = close > open
redcandle = open > close
greencandlevolume = greencandle ? vol : 0
redcandlevolume = redcandle ? vol : 0
buyvol = request.security(syminfo.tickerid, timeframe, math.sum(greencandlevolume, 500))
sellvol = request.security(syminfo.tickerid, timeframe, math.sum(redcandlevolume, 500))
buytosellratio = buyvol / sellvol
bool bearleader = sellvol > buyvol
bool bullleader = buyvol > sellvol
ptcchange = ta.change(ptcr, 14)
volcng = (buytosellratio - buytosellratio[1]) / buytosellratio[1] * 100
bullishcross = ta.crossover(buyvol, sellvol)
bearishcross = ta.crossover(sellvol, buyvol)
// ═══════════════════════════════════════════════════════════════════════════════
// KAIRI
// ═══════════════════════════════════════════════════════════════════════════════
lengthKairi = input.int(title="Length", defval=50, minval=1)
srcKairi = input.source(title="Source", defval=close)
smaKairi = ta.sma(srcKairi, lengthKairi)
kairi = 100 * (srcKairi - smaKairi) / smaKairi
// ═══════════════════════════════════════════════════════════════════════════════
// MOMENTUM
// ═══════════════════════════════════════════════════════════════════════════════
rocLength = input(3, "Rate of Change Length")
roc = ta.roc(close, rocLength)
atrLength = input(3, "ATR Length")
atr = ta.atr(atrLength)
volumeFlowLength = input(5, "Volume Flow Length")
volumeFlow = ta.cum(volume) - ta.ema(ta.cum(volume), volumeFlowLength)
shortEmaLength = input(5, "Short EMA Length")
longEmaLength = input(6, "Long EMA Length")
emaShort = ta.ema(close, shortEmaLength)
emaLong = ta.ema(close, longEmaLength)
emaDifference = emaShort - emaLong
rocNorm = (roc - ta.sma(roc, rocLength)) / ta.stdev(roc, rocLength)
atrNorm = (atr - ta.sma(atr, atrLength)) / ta.stdev(atr, atrLength)
volumeFlowNorm = (volumeFlow - ta.sma(volumeFlow, volumeFlowLength)) / ta.stdev(volumeFlow, volumeFlowLength)
emaDiffNorm = (emaDifference - ta.sma(emaDifference, longEmaLength)) / ta.stdev(emaDifference, longEmaLength)
compositeSignal = (rocNorm + atrNorm + volumeFlowNorm + emaDiffNorm) / 4
// ═══════════════════════════════════════════════════════════════════════════════
// VWAP
// ═══════════════════════════════════════════════════════════════════════════════
vw_cum = ta.cum(hlc3 * volume)
vol_cum = ta.cum(volume)
vwap = vw_cum / vol_cum
// ═══════════════════════════════════════════════════════════════════════════════
// MONEY FLOW INDEX
// ═══════════════════════════════════════════════════════════════════════════════
mfi(length) =>
typical_price = hlc3
money_flow = typical_price * volume
positive_flow = math.sum(money_flow * (close > close[1] ? 1 : 0), length)
negative_flow = math.sum(money_flow * (close < close[1] ? 1 : 0), length)
ratio = negative_flow != 0 ? positive_flow / negative_flow : 0
100 - (100 / (1 + ratio))
amplitude = input(title='Amplitude', defval=15, group="Money Flow Index Trend Zone Strength [UAlgo] Settings")
wavelength = input(title='Wavelength', defval=14, group="Money Flow Index Trend Zone Strength [UAlgo] Settings")
smoothK = input.int(3, "Smoothing Factor", minval=1, group="Money Flow Index Trend Zone Strength [UAlgo] Settings")
mfi_value = mfi(wavelength)
mfi_highest = ta.highest(mfi_value, amplitude)
mfi_lowest = ta.lowest(mfi_value, amplitude)
mfi_zs = (mfi_value - mfi_lowest) / (mfi_highest - mfi_lowest)
stoch_mfi = ta.sma(ta.stoch(mfi_zs, mfi_zs, mfi_zs, wavelength), smoothK)
// ═══════════════════════════════════════════════════════════════════════════════
// RRG CALCULATION
// ═══════════════════════════════════════════════════════════════════════════════
ticker = syminfo.ticker
panjang = input.int(20, minval=2, title='Length', group="Panjang Kuadran")
window = panjang
stock_close = request.security(ticker, timeframe.period, close)
index_close = request.security('COMPOSITE', timeframe.period, close)
rs = stock_close / index_close * 100
rs_ratio = ta.sma(rs, panjang)
rm_ratio = ta.sma(rs_ratio, panjang)
rs1 = stock_close / index_close
wma_rs = ta.wma(rs1, panjang)
rs1_ratio = ta.wma(rs1 / wma_rs, panjang) * 100
rs1_mom = rs1_ratio / ta.wma(rs1_ratio, panjang) * 100
var string currentKuadran = na
var string currentText = na
if rs1_ratio > 100 and rs1_mom > 100
currentKuadran := "LEADING"
currentText := "Tahan, ambil profit parsial"
else if rs1_ratio > 100 and rs1_mom < 100
currentKuadran := "WEAKENING"
currentText := "Pertimbangkan ambil profit"
else if rs1_ratio < 100 and rs1_mom < 100
currentKuadran := "LAGGING"
currentText := "Tunggu sinyal reversal"
else if rs1_ratio < 100 and rs1_mom > 100
currentKuadran := "IMPROVING"
currentText := "Pantau untuk entry"
tradeText = activeDir == 1 ? "▲ LONG" : activeDir == -1 ? "▼ SHORT" : "— NONE"
tradeClr = activeDir == 1 ? colBullPrimary : activeDir == -1 ? colBearPrimary : colNeutral
// ═══════════════════════════════════════════════════════════════════════════════
// MAIN TABLE
// ═══════════════════════════════════════════════════════════════════════════════
var table stats_table = table.new(table_vertical_pos + "_" + table_horizontal_pos, 2, 35, frame_width=1, bgcolor=color.rgb(0, 0, 0, 42))
table.cell(stats_table, 0, 0, text=syminfo.description, text_color=color.white, text_size=size.normal)
table.cell(stats_table, 0, 1, "("+str.tostring(syminfo.industry)+")", text_color=color.white, text_size=size.small)
table.cell(stats_table, 0, 2, " ", text_color=color.white, text_size=size.small)
table.cell(stats_table, 0, 3, "Price: "+str.tostring(math.round(close,1))+" | High: "+str.tostring(math.round(High))+" | Low: "+str.tostring(math.round(Low))+" | Avg: "+str.tostring(math.round(Avg)), text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 4, "52W Low: "+str.tostring(math.round(lowest_price))+" | 52W High: "+str.tostring(math.round(highest_price)), text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 5, "Vol: "+str.tostring(math.round(intraBarVolume/100000000,2))+" M Lot | MCap: "+str.tostring(math.round(MarketCap,3))+" B"+" | Share: "+str.tostring(math.round(SH_OUT/1000000000,2))+" B", text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 6, "Kairi: "+str.tostring(math.round(kairi,2))+" | MoM: "+str.tostring(math.round(compositeSignal,2))+" | VWap: "+str.tostring(math.round(vwap,2))+" | MFI: "+str.tostring(math.round(stoch_mfi,2)), text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 7, "RS Ratio: "+str.tostring(math.round(rs1_ratio,2))+" | RS Momentum: "+str.tostring(math.round(rs1_mom,2)), text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 8, "Kuadran: "+str.tostring(currentKuadran)+" | "+str.tostring(currentText), text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 9, "Volatility: "+str.tostring(priceVolatility, "#.##")+" | RSI ("+str.tostring(rsiLen)+") : "+str.tostring(rsiVal, "#.#")+" | STOCH K : "+str.tostring(stochK, "#.#"), text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 10, "Area Buy: "+str.tostring(math.round_to_mintick(S2))+" - "+str.tostring(math.round_to_mintick(PivotPoint))+" ((Swing))", text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 11, "Area Sell: "+str.tostring(math.round_to_mintick(R3))+" - "+str.tostring(math.round_to_mintick(R5))+" ((Swing))", text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 12, "------------Valuation----------------", text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 13, "Revenue: "+str.tostring(math.round(TOT_REV/1000000000,2))+" B | Revenue Growth: "+str.tostring(math.round(100*REV_GRW,1))+"%", text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 14, "EPS: "+str.tostring(math.round(EPSt,2))+" | BV: "+str.tostring(math.round(BV,2))+" | DER: "+str.tostring(math.round(DTE,2))+"% | CASH: "+str.tostring(math.round(Cash)), text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 15, "NPM: "+str.tostring(math.round(100*GRS_MRG,1))+"% | ROE: "+str.tostring(math.round(ROE,2))+"% | ROA: "+str.tostring(math.round(ROA))+"% | ROIC: "+str.tostring(math.round(ROIC,2))+"%", text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 16, "PER: "+str.tostring(math.round(PriceEarningsRatio,2))+" | PEG: "+str.tostring(math.round(PEGratio,2))+" | PBV: "+str.tostring(math.round(PriceBookValueRatio,2))+" | Div Yield: "+str.tostring(math.round(DIV_Y,2))+"%", text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 17, "Fair Value: "+str.tostring(math.round(VAL,0))+" | MOS: "+str.tostring(math.round(MGN_SF,1))+"% | Valuation in 5 Y: "+str.tostring(math.round(VAL1,0)), text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 18, "---------Minervini Criteria----------", text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 19, "Score: "+str.tostring(count, "(0")+" of 8)", text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 20, "---------------Trend-------------------", text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 21, "Position Trade: " + tradeText, text_color=tradeClr, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 22, "Volume Flow: " + (volume > volumeSMA ? "▲ BULLISH" : "▼ BEARISH"), text_color=volume > volumeSMA ? color.new(color.green, 0) : color.new(color.red, 0), text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 23, "Smart Money: " + (smfiSMA > 0 ? "🟢 BULLISH" : "🔴 BEARISH"), text_color=smfiSMA > 0 ? color.new(color.green, 0) : color.new(color.red, 0), text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 24, "Acc/Dist: " + (accDistSlope > 0 ? "📈 ACCUMULATION" : "📉 DISTRIBUTION"), text_color=accDistSlope > 0 ? color.new(color.green, 0) : color.new(color.red, 0), text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 25, "---------------Signal-------------------", text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 26, (volumeSpike ? "⚡ VOLUME SPIKE DETECTED!" : "── Normal Volume"), text_color=volumeSpike ? color.new(color.yellow, 0) : color.white, text_size=size.small, text_halign=text.align_left)
table.cell(stats_table, 0, 27, (significantMove ? "🎯 STRONG MOVE WITH VOLUME!" : "── Stable Movement"), text_color=significantMove ? color.new(color.green, 0) : color.white, text_size=size.small, text_halign=text.align_left)
// ═══════════════════════════════════════════════════════════════════════════════
// PRICE TABLE - TOP CENTER
// ═══════════════════════════════════════════════════════════════════════════════
var table price_table = table.new(position.top_center, 3, 7)
if barstate.islast
table.cell(price_table, 1, 0, text=syminfo.ticker + " : Rp." + str.tostring(math.round(close,1)) + " ", text_color=color.white, text_size=size.huge)
table.cell(price_table, 1, 0, text=syminfo.ticker + " : Rp." + str.tostring(math.round(close,1)) + " ", text_color=color.white, text_size=size.huge)
Script SMC versi lengkap tersedia di Ebook — mencakup Premium/Discount Zones, Big Money Detector, Momentum Squeeze, dan fitur lainnya yang tidak ter-excerpt di halaman ini.