A stock that made a big move up is now resting — pulling back a little, then a little less,
then even less. Each time it pulls back, fewer people are selling (volume dries up).
The stock is like a coiling spring — tighter and tighter. When it finally breaks out,
it tends to move fast and strong because there are almost no sellers left.
GATE 1
Enough Data Available
Need at least 150 daily candles (~7 months).
If less data available the stock is skipped entirely — not enough history to identify a valid base.
len(candles) ≥ 150
GATE 2
Price Above 150 SMA
Price must be above the 150-day Simple Moving Average.
This confirms the stock is in a Stage 2 uptrend — rising from left to right.
Stocks below 150 SMA are in downtrends and not valid VCP candidates.
price > SMA(150)
GATE 3
150 SMA Above 200 SMA
The 150-day SMA must be above the 200-day SMA.
This confirms a long-term uptrend is intact — the medium-term trend is stronger than
the long-term average. If 150 SMA is below 200 SMA, the trend is weakening.
SMA(150) > SMA(200)
GATE 4
Within 35% of 52-Week High
Price must be within 35% of its 52-week high
(relaxed from 25% in production). VCP forms near highs — not on broken stocks
far below their peak. A stock 50%+ below its high is in distress, not coiling.
(52W_high − price) / 52W_high ≤ 35%
GATE 5
At Least 2 Pullback Contractions
Must find at least 2 swing high → swing low sequences
in the last 120 days. Each sequence = one contraction (one pullback).
Detected using pivot point analysis with order=5 sensitivity.
Fewer than 2 means no pattern has formed yet.
count(swing_high → swing_low) ≥ 2 in last 120 days
GATE 6
Each Pullback Shallower Than Last
Every successive pullback must be shallower than the one before.
Example: 18% → 11% → 6% ✅ | 18% → 11% → 14% ❌.
This is the core VCP rule — contracting price volatility = sellers weakening.
depth[0] > depth[1] > depth[2] ... (strictly decreasing)
GATE 7
Depth Within Valid Range
First pullback ≥ 3% (must be a real pullback, not noise) and
last pullback ≤ 20% (relaxed from 12% in production).
If the final contraction is still 25%+ deep, the stock is not tight enough to break out cleanly.
first_depth ≥ 3% AND last_depth ≤ 20%
GATE 8
Volume Contracting Across Pullbacks
Average volume during each pullback must decline vs the prior one.
In this relaxed version: majority of consecutive pairs must show vol decline (not every single one).
Example: 5M → 3M → 1.5M ✅ | 5M → 3M → 3.5M ⚠.
Drying volume = fewer sellers each time = conviction building.
avg_vol[pullback_1] > avg_vol[pullback_2] > ... (majority)
GATE 9
Price Near the Pivot (Breakout Point)
Price must be within 15% of the pivot
(relaxed from 5% in production). The pivot = highest peak among all the recent contractions
= the resistance level the stock needs to break above.
Too far below = still building the base, not ready yet.
(pivot − price) / pivot ≤ 15%
GATE 10 BONUS
Duration Also Contracting
Each pullback takes fewer days than the previous one.
This is a bonus gate — failing it does not eliminate the stock.
Duration contraction = the market is spending less time correcting = buyers absorbing supply faster.
Example: 15 days → 10 days → 6 days ✅
duration[0] ≥ duration[1] ≥ duration[2] ... (bonus, not required)
📊 How the Score is Calculated
Score = (gates passed / total gates) × 100. Higher = closer to a textbook VCP.
≥ 90 — Elite
81–89 — Strong
⚠ Eligibility (minimum to appear in results): must pass Gate 2 (uptrend) + Gate 4 (near 52W high) + Gate 5 (contractions found) — and score above 80. Stocks scoring 80 or below are not shown on this page.