OPEN-SOURCE SCRIPT
Momentum Permission + Pivot Entry (v1.4 CLEAN ENTRY)

//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)
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)
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.