Indicator · Pine Script v6 · On the chart

VCP Setup

by ankurksoni

A price-chart overlay that scans for volatility contraction setups, mainly on daily charts.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code314
Settings37inputs
LicenceNone stated
Last update2 days ago27 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  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

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.

Details

Published by

ankurksoni on GitHub

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Volume, Volatility & bands, Divergence

Markets

Stocks

Timeframes

H4 and above

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
Intrabar PrecisionstringLTF2i_ltfMode
Lookback Bars (~2.5 months on daily)int75i_lookback
Min CVD Bullish Divergencesint3i_minDivs
Price Range % from High / Lowfloat25.0i_pctThresh
Bollinger Bandwidth Threshold (<)float15.0i_bbwThresh
Dark Modebooltruei_darkMode
Highlight setup candlesbooltruei_colorSetup
Setup candle colorcolorcolor.new(#888888, 0)i_setupColor
CVD Div dot colorcolorcolor.rgb(red = 173, green = 238, blue = 179, transp = 50)i_divDot
CVD dot gap below candle (%)float8.0i_arrowGap
RS score/dot gap below candle (%)float9.0i_rsGap
Show RS score only when ≥int80i_rsThresh
Show all 37 settings
SettingTypeDefaultVariable
Highlight tight 3-bar zonebooltruei_showTight
Tight zone display stylestringLine above charti_tightStyle
Tight zone lookback barsint10i_tightLookback
Tight zone tolerance % from medianfloat1.5i_tightPct
Tight zone colorcolorcolor.new(color.yellow, 50)i_tightColor
Show Anchored VWAPboolfalsei_showAvwap
Anchor Datetimetimestamp("30 Mar 2026 00:00 +0000")i_anchorDate
AVWAP Colorcolorcolor.new(color.orange, 50)i_avwapColor
Show 10 EMAbooltruei_show10
i_ema10Clrcolorcolor.new(color.white, 5)i_ema10Clr
Show 20 EMAbooltruei_show20
i_ema20Clrcolorcolor.new(color.yellow, 5)i_ema20Clr
Show 50 EMAbooltruei_show50
i_ema50Clrcolorcolor.new(color.green, 5)i_ema50Clr
Show 200 EMAbooltruei_show200
i_ema200Clrcolorcolor.new(color.red, 5)i_ema200Clr
Show RS lineboolfalsei_showRS
vssymbolNSE:NIFTYSMLCAP250i_idxSym
RS Periodint20i_rsPeriod
Show HLC Bar Chartbooltruei_showHlc
Bullish Colorcolor#0097A7i_hlcBullClr
Bearish Colorcolor#EC407Ai_hlcBearClr
Show pressure line at bottom of chartboolfalsei_showPressure
Pressure lookback barsint20i_pressLookback
Body/range weightedboolfalsei_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.

Similar Pine Scripts

RSI Div at dVWAP StDev

by cryptorife
75 stars

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

Indicator v4 DivergenceOscillators & momentum Repaints
Updated 3 years ago · GPL-3.0 GitHub repository of RSI Div at dVWAP StDev

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

Indicator v5 Oscillators & momentumVolatility & bands Repaints
Updated 7 weeks ago · None stated GitHub repository of Adaptive Volatility-Adjusted Momentum Score
2 stars

Delta Volume Channels calculates volume-weighted delta channels and reference moving averages using lower timeframe intrabar volume data. It plots directly on the main price chart, displaying dynamic channel fills, reference lines, delta volume-weighted lines,

Indicator v5 VolumeVolatility & bands
Updated 8 months ago · None stated GitHub repository of Delta Volume Channels [LucF]

QPulse

by JasonTeixeira
9 stars

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

Indicator v6 Oscillators & momentumVolatility & bands
Updated 13 days ago · Custom licence GitHub repository of QPulse

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

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of TLC 0 to 100 Five Indicators VolMom

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