1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
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
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
VCP Setup counts bullish divergences between price and cumulative volume delta built from intrabar data, within a lookback window, and checks that price sits near the range high and above the range low and that Bollinger bandwidth is below a threshold. Matching candles can be highlighted, a tight three-bar zone can be marked, and 10, 20, 50 and 200 EMAs, an anchored VWAP and a relative strength score against an index are optional. It marks setups only.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Intrabar Precision
string
LTF2
i_ltfMode
Lookback Bars (~2.5 months on daily)
int
75
i_lookback
Min CVD Bullish Divergences
int
3
i_minDivs
Price Range % from High / Low
float
25.0
i_pctThresh
Bollinger Bandwidth Threshold (<)
float
15.0
i_bbwThresh
Dark Mode
bool
true
i_darkMode
Highlight setup candles
bool
true
i_colorSetup
Setup candle color
color
color.new(#888888, 0)
i_setupColor
CVD Div dot color
color
color.rgb(red = 173, green = 238, blue = 179, transp = 50)
i_divDot
CVD dot gap below candle (%)
float
8.0
i_arrowGap
RS score/dot gap below candle (%)
float
9.0
i_rsGap
Show RS score only when ≥
int
80
i_rsThresh
Show all 37 settings
Setting
Type
Default
Variable
Highlight tight 3-bar zone
bool
true
i_showTight
Tight zone display style
string
Line above chart
i_tightStyle
Tight zone lookback bars
int
10
i_tightLookback
Tight zone tolerance % from median
float
1.5
i_tightPct
Tight zone color
color
color.new(color.yellow, 50)
i_tightColor
Show Anchored VWAP
bool
false
i_showAvwap
Anchor Date
time
timestamp("30 Mar 2026 00:00 +0000")
i_anchorDate
AVWAP Color
color
color.new(color.orange, 50)
i_avwapColor
Show 10 EMA
bool
true
i_show10
i_ema10Clr
color
color.new(color.white, 5)
i_ema10Clr
Show 20 EMA
bool
true
i_show20
i_ema20Clr
color
color.new(color.yellow, 5)
i_ema20Clr
Show 50 EMA
bool
true
i_show50
i_ema50Clr
color
color.new(color.green, 5)
i_ema50Clr
Show 200 EMA
bool
true
i_show200
i_ema200Clr
color
color.new(color.red, 5)
i_ema200Clr
Show RS line
bool
false
i_showRS
vs
symbol
NSE:NIFTYSMLCAP250
i_idxSym
RS Period
int
20
i_rsPeriod
Show HLC Bar Chart
bool
true
i_showHlc
Bullish Color
color
#0097A7
i_hlcBullClr
Bearish Color
color
#EC407A
i_hlcBearClr
Show pressure line at bottom of chart
bool
false
i_showPressure
Pressure lookback bars
int
20
i_pressLookback
Body/range weighted
bool
false
i_pressWeighted
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.
This indicator marks RSI divergences only when price trades beyond daily VWAP standard-deviation bands. It compares recent RSI extremes with price highs and lows over a lookback window, and it treats a divergence as valid only while RSI stays beyond overbought
This indicator builds a momentum score from the rate of change of close, using a lookback that expands or contracts with ATR relative to its standard deviation. It divides that rate of change by price standard deviation, scales the result, and weights it by vo
QPulse is a multi-factor indicator that draws in a separate pane to evaluate market momentum, volume flow, and volatility dynamics. It calculates volume delta, a cumulative delta proxy, advanced adaptive ATR, and a hybrid volume-weighted RSI with overbought an
This indicator combines five technical metrics normalized between 0 and 100 in a separate pane: RSI (with optional divergence detection), Stochastic, Relative Volatility Index (RVI), Average Directional Index (ADX), and Money Flow Index (MFI). Users can select
This indicator marks internal divergence when a same-direction signal leg moves farther than the peak, or the mean plus a sigma multiple, of earlier legs. It runs trend, momentum, volatility and volume calculations as four separate methods in a separate pane.