1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
157 lines of Pine Script v6 from MomentumContinuationProAlgo.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.
MomentumContinuationProAlgo.pine
// Momentum Continuation Pro Algo
// Free use (GitHub release)
// Purpose: Momentum + structure confirmation tool (not signals)
// Notes: Designed for continuation conditions; avoid chop/range
// Use at your own risk. Not financial advice.
//@version=6
indicator("0-DTE Momentum Continuation Pro v4 (A+)", overlay=true)
//━━━━━━━━━━━━━━━━━━━
// INPUTS
//━━━━━━━━━━━━━━━━━━━
emaFastLen = input.int(9, "EMA Fast")
emaSlowLen = input.int(21, "EMA Slow")
volLen = input.int(20, "Volume MA Length")
atrLen = input.int(14, "ATR Length")
atrStopMult = input.float(0.75, "ATR Premium Protection")
useVWAP = input.bool(true, "Use VWAP")
useHTF = input.bool(true, "Use 15m HTF Bias")
//━━━━━━━━━━━━━━━━━━━
// TIME FILTER (0-DTE SAFE)
//━━━━━━━━━━━━━━━━━━━
tradeSession =
(hour(time) == 9 and minute(time) >= 35) or
(hour(time) > 9 and hour(time) < 11) or
(hour(time) == 11 and minute(time) <= 30) or
(hour(time) >= 13 and hour(time) < 15) or
(hour(time) == 15 and minute(time) <= 30)
//━━━━━━━━━━━━━━━━━━━
// INDICATORS
//━━━━━━━━━━━━━━━━━━━
emaFast = ta.ema(close, emaFastLen)
emaSlow = ta.ema(close, emaSlowLen)
vwapVal = ta.vwap(hlc3)
atr = ta.atr(atrLen)
atrMA = ta.sma(atr, atrLen)
volMA = ta.sma(volume, volLen)
highVolume = volume > volMA
//━━━━━━━━━━━━━━━━━━━
// HTF BIAS (NON-REPAINT)
//━━━━━━━━━━━━━━━━━━━
htfEmaFast = request.security(syminfo.tickerid, "15", ta.ema(close, emaFastLen))
htfEmaSlow = request.security(syminfo.tickerid, "15", ta.ema(close, emaSlowLen))
htfBull = not useHTF or htfEmaFast > htfEmaSlow
htfBear = not useHTF or htfEmaFast < htfEmaSlow
//━━━━━━━━━━━━━━━━━━━
// MOMENTUM LOGIC
//━━━━━━━━━━━━━━━━━━━
bullTrend = emaFast > emaSlow
bearTrend = emaFast < emaSlow
bullMomentum = close > emaFast and close > emaSlow
bearMomentum = close < emaFast and close < emaSlow
vwapBull = not useVWAP or close > vwapVal
vwapBear = not useVWAP or close < vwapVal
atrExpanding = atr > atrMA
strongBullCandle = close > open and close > high - (high - low) * 0.3
strongBearCandle = close < open and close < low + (high - low) * 0.3
//━━━━━━━━━━━━━━━━━━━
// TREND STRENGTH SCORE (0–100)
//━━━━━━━━━━━━━━━━━━━
emaStrength = math.min(25, math.abs(emaFast - emaSlow) / atr * 25)
vwapStrength = math.min(25, math.abs(close - vwapVal) / atr * 25)
volStrength = highVolume ? 25 : 0
atrStrength = atrExpanding ? 25 : 0
trendScore = emaStrength + vwapStrength + volStrength + atrStrength
isAPlus = trendScore >= 75
isBPlus = trendScore >= 60 and trendScore < 75
//━━━━━━━━━━━━━━━━━━━
// ENTRY SIGNALS
//━━━━━━━━━━━━━━━━━━━
buySignal =
tradeSession and
bullTrend and
bullMomentum and
vwapBull and
strongBullCandle and
htfBull
sellSignal =
tradeSession and
bearTrend and
bearMomentum and
vwapBear and
strongBearCandle and
htfBear
//━━━━━━━━━━━━━━━━━━━
// POSITION TRACKING
//━━━━━━━━━━━━━━━━━━━
var int position = 0
var float entryPrice = na
if buySignal and position == 0
position := 1
entryPrice := close
if sellSignal and position == 0
position := -1
entryPrice := close
exitLong =
position == 1 and (
close < emaFast or
(useVWAP and close < vwapVal) or
close < entryPrice - atr * atrStopMult
)
exitShort =
position == -1 and (
close > emaFast or
(useVWAP and close > vwapVal) or
close > entryPrice + atr * atrStopMult
)
if exitLong or exitShort
position := 0
entryPrice := na
//━━━━━━━━━━━━━━━━━━━
// VISUALS
//━━━━━━━━━━━━━━━━━━━
plot(emaFast, color=color.orange, linewidth=2)
plot(emaSlow, color=color.blue, linewidth=2)
plot(useVWAP ? vwapVal : na, color=color.purple, linewidth=2)
plotshape(buySignal and isAPlus, style=shape.labelup,
color=color.lime, text="A+ BUY", location=location.belowbar)
plotshape(buySignal and isBPlus, style=shape.labelup,
color=color.green, text="B BUY", location=location.belowbar)
plotshape(sellSignal and isAPlus, style=shape.labeldown,
color=color.red, text="A+ SELL", location=location.abovebar)
plotshape(sellSignal and isBPlus, style=shape.labeldown,
color=color.maroon, text="B SELL", location=location.abovebar)
plotshape(exitLong or exitShort, style=shape.xcross,
color=color.yellow, size=size.small)
Overview
0-DTE Momentum Continuation Pro calculates EMA trend structure using fast and slow EMAs, checks momentum with close price position relative to EMAs, applies optional VWAP filter and higher-timeframe 15-minute bias, evaluates volume against its MA, ATR expansion and candlestick strength. Labels appear only when trade session conditions align with high trend score. Settings control EMA lengths, volume and ATR periods plus toggles for VWAP and HTF bias. The tool provides context confirmation rather than automated entries or exits and draws exclusively on the price chart.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
EMA Fast
int
9
emaFastLen
EMA Slow
int
21
emaSlowLen
Volume MA Length
int
20
volLen
ATR Length
int
14
atrLen
ATR Premium Protection
float
0.75
atrStopMult
Use VWAP
bool
true
useVWAP
Use 15m HTF Bias
bool
true
useHTF
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
ADX Strategy (original) is an overlay indicator that identifies trend-following trade signals using the Average Directional Index (ADX) combined with a Simple Moving Average filter. A long signal is generated when the ADX rises above a user-defined trend level
Double Screened Decision is a multi-timeframe trend and momentum indicator overlaid directly on the price chart. It dynamically selects a higher timeframe based on the active chart resolution to evaluate higher-timeframe MACD, Bollinger Bands, RSI, and Stochas
This indicator plots Bollinger Bands on the price chart alongside a baseline moving average to identify trend-aligned swing setups. It calculates trend bias by comparing the Bollinger Bands basis to a customizable moving average, such as a 200 EMA. Trade signa
Index Intraday Analyst overlays CBOE cash indices such as SPX, NDX, RUT, and DJX. It plots a multi-EMA ribbon, a session-anchored TWAP with standard-deviation bands, and session levels such as prior-day high, low, and close, the opening range, and the high and
RePaNoCHa V4 is an overlay alert indicator that plots a Tillson T3 moving average on the price chart and colors it by whether the line is rising or falling. It combines that slope with a range filter, ADX, parabolic SAR, RSI, and MACD to mark long and short si
This indicator plots an exponential moving average and marks momentum-based trade sessions on the price chart. It treats RSI between 45 and 55 as chop and shades the background when momentum is present. Long and short labels appear when MACD crosses its signal