Indicator · Pine Script v6 · On the chart

0-DTE Momentum Continuation Pro

by bptrades

0-DTE Momentum Continuation Pro is a Pine Script indicator that overlays labels on the price chart to mark A+ BUY, A+ SELL, B BUY and B SELL setups.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code157
Settings7inputs
LicenceMIT
Last update8 months ago6 Feb 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 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.

Details

Published by

bptrades on GitHub

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Trend, Oscillators & momentum, Moving averages, Volatility & bands

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
EMA Fastint9emaFastLen
EMA Slowint21emaSlowLen
Volume MA Lengthint20volLen
ATR Lengthint14atrLen
ATR Premium Protectionfloat0.75atrStopMult
Use VWAPbooltrueuseVWAP
Use 15m HTF BiasbooltrueuseHTF
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.

Similar Pine Scripts

114 stars

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

Indicator v4 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of ADX Strategy (original)
56 stars

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

Indicator v5 TrendMoving averages Repaints
Updated 4 months ago · None stated GitHub repository of Double Screened Decision
24 stars

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

Indicator v5 Volatility & bandsOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of Bollinger Band Swing

Index Intraday Analyst

by chris-c-thomas
14 stars

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

Indicator v6 TrendOscillators & momentum
Updated 6 months ago · MIT GitHub repository of Index Intraday Analyst

RePaNoCHa V4

by wocclyl
9 stars

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

Indicator v4 TrendOscillators & momentum
Updated 7 years ago · MIT GitHub repository of RePaNoCHa V4

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers