OPEN-SOURCE SCRIPT

Momentum Permission + Pivot Entry (v1.4 CLEAN ENTRY)

22
//version=5
indicator("Momentum Permission + Pivot Entry (v1.4 CLEAN ENTRY)", overlay=true)

// ─────────── INPUTS ───────────
pivotLookback = input.int(3, "Pivot Lookback")
smaLen = input.int(50, "SMA Length")
relVolTh = input.float(1.3, "RelVol Threshold")

// ─────────── TREND + MOMENTUM — BASICS ───────────
vwapLine = ta.vwap
smaLine = ta.sma(close, smaLen)
relVol = volume / ta.sma(volume, 10)

pivotLow = ta.lowest(low, pivotLookback) == low
trendUp = close > smaLine
aboveVWAP = close > vwapLine
greenCandle = close > open

// ─────────── PERMISSION (Context Only) ───────────
permitSignal = trendUp and (relVol > relVolTh)

// ─────────── ENTRY LOGIC — ONE CLEAN SIGNAL ───────────
rawEntry = permitSignal and aboveVWAP and pivotLow and greenCandle

// Anti-spam: only first signal in a move
entrySignal = rawEntry and not rawEntry[1]

// ─────────── VISUAL SHAPES (Clean) ───────────
plotshape(permitSignal, style=shape.triangleup, color=color.lime, size=size.tiny, location=location.bottom, text="PERMIT")
plotshape(entrySignal, style=shape.triangleup, color=color.aqua, size=size.small, text="ENTRY")

// ─────────── TREND VISUALS ───────────
plot(vwapLine, "VWAP", color=color.blue, linewidth=2)
plot(smaLine, "SMA50", color=color.orange, linewidth=2)

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.