Elite CVD: context-aware volume delta with divergencesWHAT IT DOES
A cumulative volume delta pane that estimates who is actually in control. Instead of splitting every bar's volume 50/50, the context-aware proxy weights wick volume directionally from candle structure, so a strong-bodied bar with a rejected wick reads the way it traded.
HOW IT WORKS
- Three proxy models: Context-Aware (recommended), Blended, and Classic High-Low — switch and compare.
- CVD resets per session by default (fixed-length and running modes available), so today's line reflects today's flow.
- RVOL weighting amplifies delta on genuinely heavy bars via square-root scaling; spike bars get a dot on the line.
- A four-tier histogram colors per-bar delta by acceleration: bright when pressure is building, dim when it fades.
- Pivot-based divergence detection flags price highs on weakening demand and price lows on weakening supply. Honest note: divergences confirm only after the pivot's right-side bars complete, so the marker appears with that lag, placed on the pivot bar.
HOW TO USE IT
Built for ES/NQ scalping on intraday charts, works anywhere volume is meaningful. Read the line's slope for control, the histogram for urgency, and treat divergences as a warning to tighten up, not an entry by themselves.
WHAT IT CAN'T DO
All volume delta from OHLC data is an estimate — this is a well-built proxy, not tick data. On thin symbols the estimate degrades with the volume.
SETTINGS
Proxy model, reset mode, signal line, display mode, RVOL weighting and spike threshold, divergence pivots, info table, colors.
Open source. Free. If it helps you stop fading real pressure, that's the job. Indicador

Order Flow Volume Delta, CVD, Absorption & Divergence [LunqFX]Price shows you WHERE the market went. Order flow shows you WHO pushed it there — buyers or sellers — and whether they had real volume behind the move. This Order Flow indicator reads the volume delta on every candle (the balance of buying volume vs selling volume), builds it into a cumulative volume delta (CVD) trend, and automatically marks the two order-flow events that lead price: absorption and delta divergence. Everything is drawn on your chart as clean delta candles, order-flow support/resistance levels and a live buying-pressure dashboard.
❶ THE CONCEPTS (so it's clear)
▸ VOLUME DELTA — the difference between buying volume and selling volume inside a bar. Positive delta = buyers were more aggressive, negative = sellers. It is the core of all order-flow analysis.
▸ CVD (CUMULATIVE VOLUME DELTA) — delta added up over time. A rising CVD means buyers are steadily accumulating; a falling CVD means distribution by sellers. CVD is how you see the real trend of order flow, not just price.
▸ ABSORPTION — a bar with heavy volume but almost no price movement. It means a large player (smart money / institutional) is absorbing every market order at that level. Absorption very often appears right before a reversal.
▸ DELTA DIVERGENCE — price makes a new high but CVD does not (or a new low but CVD does not). The move has no real volume behind it — a trap / exhaustion signal that warns a reversal is likely.
❷ WHAT YOU SEE ON THE CHART
▸ Delta candles — sky-blue when buyers won the bar, coral when sellers won; the brighter the candle, the more one-sided the flow. You read buying and selling pressure at a glance.
▸ Order-flow levels — every absorption (gold) and divergence (blue / coral) is projected to the right as a support/resistance level with its exact price. These are the levels where big volume actually traded, so price reacts to them again.
▸ Live dashboard — who is in control (buyers vs sellers) from the CVD, the CVD value, the current bar's buy/sell pressure split, and the latest signal.
❸ HOW TO TRADE IT — STEP BY STEP
1 — Read the BIAS. The panel shows ▲ BUYERS or ▼ SELLERS IN CONTROL from the CVD. Trade with the side that controls order flow, not against it.
2 — Watch for DELTA DIVERGENCE against the move. Price higher high while CVD makes a lower high = buyers are exhausted → look for shorts. Price lower low while CVD makes a higher low = sellers are exhausted → look for longs. This is the highest-value order-flow reversal signal.
3 — Use ABSORPTION as a reversal cue. When heavy volume fails to move price, the move is being absorbed; watch for the turn and use that gold level as your invalidation line.
4 — Trade the reaction at order-flow levels. Old absorption and divergence levels act as support and resistance — enter when the delta flips back in your favour as price returns to a level.
5 — Confirm with Bar pressure. The panel's ▲/▼ % buy shows the live buy/sell split — take the trade when it agrees with your setup and the bias.
❹ HOW IT WORKS (fully transparent)
Each bar's volume is split by where price closed in its range: buy-volume = volume × (close − low) ÷ range, sell-volume = volume × (high − close) ÷ range, and delta = buy − sell. This is a transparent, range-based volume-delta estimate — it needs no tick or bid/ask feed, so it runs on any symbol. CVD is the running sum of that delta (session-anchored on intraday charts, fully cumulative on daily and higher, handled automatically). Absorption is flagged when volume rises above its average by your chosen multiple while the candle body stays smaller than a fraction of ATR. Divergence compares each confirmed swing pivot in price with the CVD value at that pivot. Every reading comes from closed bars and confirmed pivots — no repainting, no lookahead.
Order flow is strongest on markets with true exchange volume — crypto, stocks, futures and indices — and on intraday timeframes (1m–4h), where buying and selling pressure is most meaningful. On forex, volume is broker tick-volume, so treat the delta as an approximation of order flow rather than exact.
SETTINGS — CVD reset (Session / Week / None), absorption sensitivity, divergence swing length, number of order-flow levels + glow, delta candles on/off, dashboard position.
ALERTS — bullish delta divergence, bearish delta divergence, absorption, and CVD crossing zero (buyers / sellers taking control).
This indicator is an educational market-analysis tool, not financial advice. The volume delta shown here is a transparent estimate from price and volume, not exchange-audited bid/ask order flow, and past behaviour does not guarantee future results. Always confirm with your own analysis and manage your risk.
Indicador

Orderflow Suite [martineye15]Orderflow Suite — four order-flow tools in one indicator: Cumulative Volume Delta, footprint bars, imbalance / absorption signals, and a volume profile. Each module toggles independently, so you can run the full suite or just the part you need. CVD gets its own pane; the footprint, signals and profile draw directly on the price chart, so no second script is required.
MODULES
- Cumulative Volume Delta (CVD): running buy-minus-sell volume, with Session / Day / Week / None reset anchoring and a Line, Columns or Candle display (candles show open = previous CVD, close = new CVD, wicks from the intrabar delta extremes). Optional price-CVD divergence: bearish when price makes a higher high while CVD makes a lower high, bullish when price makes a lower low while CVD makes a higher low.
- Footprint bars: the most recent bars are split into price bins, each showing aggregated buy x sell volume, shaded by its net delta, with the bar's highest-volume bin (VPOC) framed.
- Imbalance & absorption: delta-imbalance triangles when |delta| / volume passes a threshold, stacked-imbalance zones when several same-direction imbalance bars line up, plus absorption labels (heavy volume in a tight range near a swing) and exhaustion labels (a new swing high on negative delta, or a new swing low on positive delta).
- Volume profile: a volume-at-price histogram over a lookback window with POC, value-area high / low and the 70% value area, in total-volume or delta-coloured mode.
DELTA ENGINE (please read)
TradingView does not provide a true bid/ask tick feed, so delta here is an approximation, not exchange order flow. Historical delta is estimated from lower-timeframe intrabars: an intrabar counts as buy volume when it closes above its open, sell volume when below, and is split evenly on an unchanged close. On the live bar you can optionally accumulate tick-based delta instead (uptick = buy, downtick = sell). Because TradingView does not store ticks, realtime values built this way can differ from what the same bar shows after a chart refresh. Treat every delta value as an estimate.
ALERTS
Ten conditions: CVD bullish / bearish divergence, bullish / bearish imbalance, stacked bullish / bearish imbalance, absorption at highs / lows, and exhaustion top / bottom.
HOW TO USE
Add it to a symbol that has volume (crypto, futures or stocks — spot forex usually has no real volume, and the tool will tell you so). Intraday timeframes from about 1 minute to 1 hour work best. Turn on the modules you want, set the delta engine (lower-timeframe auto / manual, and optional realtime tick mode), and adjust the per-module thresholds and sizes. Use CVD and its divergences for momentum and non-confirmation, the footprint and profile to see where volume actually traded, and the imbalance / absorption / exhaustion signals as context around swings. Set alerts on any of the ten conditions.
WHAT MAKES IT DIFFERENT
It combines CVD, footprint, imbalance / absorption and a volume profile in a single indicator, sharing one delta engine and drawing the price-chart modules through force_overlay from a lower pane — a combined order-flow view without stacking several scripts. Drawing counts are budgeted internally so the modules together stay within TradingView's object limits.
REPAINTING & LIMITATIONS
Confirmed-bar behaviour is stable: footprints are built on closed bars, CVD divergences use confirmed pivots (so they appear a few bars after the pivot — normal pivot lag, not repainting), and the profile is computed over completed bars. The delta approximation is the main caveat: the live bar's delta is an estimate, and if you enable realtime tick mode, the live values will not match the same bar's historical lower-timeframe values after a refresh — this is inherent to how TradingView exposes data and is noted in the input tooltips. One-second intrabars need a plan with seconds data; without it the tool uses a one-minute fallback, and very old bars beyond the intrabar budget fall back to whole-bar classification. A symbol with no volume cannot produce delta and will show a notice instead.
This is a visual, decision-support tool. It is not a strategy, it places no orders and reports no performance statistics, and it is not financial advice. Indicador

Burst Size Flow Divergence Large vs Small CVDOverview
A single cumulative-delta line tells you net buying or selling, but hides who is doing the pushing. Burst-Size Flow Divergence splits the flow inside each bar by the size of each volume burst — small / medium / large sub-intervals — and runs a separate signed delta on each tier. The signal is the divergence between the large-burst delta and the small-burst delta: concentrated bursts leaning one way while trickle flow leans the other. It is a flow-structure read, not a signal to trade alone.
What this is — and is NOT (read this before using)
This measures activity-burst size, not per-trade size. Pine cannot see individual trades — it sees a bar's volume and, via lower-timeframe requests, the volume of each sub-interval within the bar. "Large" here means a sub-interval that printed a lot of volume relative to normal — not a large single trade, and not "institutional." Institutions deliberately slice big orders into many small child-orders, so burst size is a proxy, not proof of who is behind the flow. The classification is honest about this, and the built-in harness is there precisely to test whether the divergence carries any information rather than to assert that it does.
Why these components are ONE tool (mashup justification)
Each stage exists because the previous one is ambiguous on its own:
Intrabar bucketing. Each lower-timeframe sub-bar is classed small/medium/large by its volume against an adaptive average, so "large" means large for this symbol and session, not a fixed lot count. A fixed threshold would misclassify on every instrument and every volatility regime.
Per-tier directional imbalance. Each tier gets its own signed delta (up sub-bar → +volume, down → −volume), expressed as net ÷ gross in — what fraction of that tier was net buying versus selling. Normalising this way lets the tiers' directions be compared apples-to-apples even though the large tier moves far less total volume than the small one.
The divergence. The large-minus-small spread is the object. Three separate delta lines would just be clutter to eyeball; the disagreement between the concentrated and the trickle flow is the actual read, so the tool computes it directly.
The calibration harness. "Concentrated bursts are informed" is a hypothesis, not a law — so when the spread is strong, the harness checks forward whether price actually followed the large tier more than the unconditional base rate, and reports Hit / Base / Edge on confirmed bars. That's what turns the divergence from a story into something you can verify on your instrument.
How it works
For each chart bar the finest available sub-bars are requested. Each is signed by close-versus-open (a tick-rule aggressor proxy) and bucketed by volume against the adaptive average. Per-tier signed volume becomes a net÷gross imbalance in , the large-minus-small spread is smoothed into the oscillator, and a strong gated spread is the divergence signal.
How to use it
Read the histogram (the large-minus-small spread): green means large bursts are accumulating while small flow lags or sells; red means large bursts are distributing. The bold line is the large-tier imbalance, the faint line the small tier. A gated turn in the spread suggests concentrated flow is leading, and is marked in the pane and — optionally — on the price chart. Always check the Coverage row (how much real sub-bar resolution the current bar received) and the Edge row (whether the divergence has actually led on this instrument). It is never a standalone trigger.
Plan-adaptive & data note
Sub-bar precision auto-selects the finest your plan serves (seconds on Premium+, else 1-minute). Lower-timeframe data exists only for recent bars, so older bars fall back to whole-bar flow and the coverage read shows it. The tool needs an instrument with real volume — a cash index reports none, so use the futures. The adaptive average and the calibration harness advance only on confirmed bars, so they never drift or inflate intrabar. Edge is in-sample, no costs — a study aid, not a backtest.
Originality
The parts are public: cumulative volume delta, the close-vs-open (tick-rule) aggressor proxy, and the general idea of size-partitioned / flow-toxicity order flow. What's assembled here is the specific construction — the adaptive intrabar size-tiering, the net÷gross per-tier imbalance that makes tiers of very different volume directly comparable, the large-minus-small divergence as the headline object, and the forward-calibration harness that scores it against the base rate. This is a clean-room implementation; no third-party Pine code is reused.
Concept credits
Cumulative Volume Delta — standard order-flow technique.
Close-vs-open (tick-rule) aggressor classification — after the classic trade-sign literature (Lee & Ready).
Size-partitioned / flow-toxicity order flow (VPIN) — Easley, López de Prado & O'Hara.
Disclaimer
Research and educational tool only. Not financial advice, no recommendation, no guarantee of results. Burst size is not trade size and does not identify institutions versus retail; the up/down sign is a close-vs-open proxy for the aggressor, not the true tape. Indicators describe past behaviour; they do not predict the future. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability. Indicador

CVD Pressure Aura [Weather HUD]Order flow rendered as living weather around the price — an immersive perception tool, not a signal generator.
CVD Pressure Aura turns cumulative volume delta into a living atmospheric heads-up display that surrounds your candles like weather around a glass pane.
Instead of staring at abstract bars in a separate pane, you now feel the pressure regime directly on the chart: buying pressure pushing up from below as a glowing green aura, selling pressure pouring down from above as a red flood. The market’s breathing, compression, and exhaustion become visible at a glance.
How to Read It
A smooth envelope (default: Bollinger 20 SMA ± 2σ, now with optional smoothed Keltner channel) acts as the “glass.” All order flow lives outside it — the candles stay clean and readable at all times.
🌱 Green aura below — buying pressure rising from beneath. Taller and brighter = stronger, more persistent demand.
🌧 Red flood above — selling pressure pouring down. Same logic, mirrored.
The Aura Breathes
A slow SMA (200 default) drives the regime engine:
Compression — When volatility squeezes, cyan clamps close in from above and below, tightening the coil. You can literally watch the market rally straight into a pressure zone and feel the crowd standing at that level.
Exhaustion — When price stretches far from the slow SMA, the opposing aura swells (gravity above an over-extended rally, spring loading beneath an over-extended sell-off). ⚡ marks full stretch.
Symbols (full weather legend available on-chart)
🡑 / 🡓 — strong one-sided flow this bar (sparks / rain)
☀ / ☂ — extreme flow, top 10% of lookback (thermal / storm)
⚡ — full exhaustion (maximally stretched from slow SMA)
▼ cyan — full coil (tightest squeeze of the lookback)
✦ orange (above) — bearish divergence: new price high, CVD refuses to follow
✦ cyan (below) — bullish divergence: new price low, CVD refuses to follow
Key Features
New: Smoothed Keltner Channel option for a cleaner, more adaptive glass pane
Cyan compression clamps that visually tighten during squeezes
Overdrive slider (0–100) for full immersion
Rolling regime engine with breathing mechanics
Works on any timeframe and symbol with volume
This is a perception instrument, engineered to make order flow feelable rather than merely measurable. Nothing here is financial advice — it exists to help you develop an intuitive sense of market pressure.
Engineered with Claude (Anthropic). Feedback and ideas for future iterations are very welcome.
Release notes (v1.2)
NEW: Keltner Channel envelope mode (SMA or EMA basis ± ATR) — the smoothest glass
NEW: Cyan compression clamps replace the coil glyph — squeeze pressure now presses visibly on the envelope from both sides, readable at any zoom level
NEW: State-colored moving averages — slow SMA by slope, basis by regime (cyan coil / green bull / red bear / gray indecision)
On-chart weather legend, default bottom-left (clear of the TradingView symbol overlay)
Plot budget optimized to fit the 64-plot engine limit
Indicador

Adaptive Structural Trail Order Flow, Imbalance & RegimeAdaptive Structural Trail — Order Flow, Imbalance & Regime
What it is
Adaptive Structural Trail is a single, self-contained market-structure framework that re-clocks the chart by participation instead of time, marks the imbalances that real activity leaves behind, lets order flow decide which of those levels still matter, asks a regime filter whether trending behaviour can be trusted right now, and trails the strongest surviving level as an adaptive stop — all summarised in a plain-language dashboard that tells you, at a glance, whether the picture says ride, wait, or stand aside.
It is designed to be market-agnostic: every raw input (price, volume, and the volatility-index reference) is user-selectable, so the same logic runs on index futures, equities, FX, crypto or commodities without touching the code. Defaults are set for NIFTY index futures; change the volatility symbol and (if needed) the volume source for other instruments.
Why the components are combined (this is one tool, not a bundle)
Each layer measures a different facet of one process — activity creating structure, structure decaying or being defended, and a regime deciding whether to act. They are not independent indicators stacked for visual effect; remove any one and the others lose their meaning:
Delta clock (the substrate). A virtual bar closes only when cumulative signed volume becomes statistically significant (σ × a multiplier). Every downstream reading is therefore spaced by participation, not by the clock — a quiet 10 minutes and a violent 10 seconds are treated differently, which is the whole point.
Imbalance / fair-value-gap detection runs on those virtual bars, so a level is recorded only where genuine activity gapped price, not on arbitrary time bars.
Order-flow lifecycle (charge → decay → breaker/dead). When price returns to a level, delta adjudicates the outcome: absorbed-and-defended levels are reborn as breakers; levels that are surged through are killed. Flow decides what structure survives.
Regime gate (efficiency ratio + volatility burst). This routes everything. The trail is shown and signals arm only where trend behaviour is statistically credible; in range/transition/high-volatility states the tool deliberately stands aside.
Confidence fusion. Structure strength, cumulative-delta slope and flow toxicity (VPIN) are blended into one confidence number, which the dashboard converts into a plain instruction.
That coupling — a volume-significance clock feeding imbalance detection whose survival is adjudicated by order flow and gated by regime, fused into a single trailing level and a decision read-out — is the original contribution here.
How to use it
Add it to any liquid instrument. It is built for intraday timeframes (1–15 min is the sweet spot on index futures).
Read the dashboard top-down: the ACTION banner is the headline (e.g. LONG · ride the trail, RANGE · stand aside). Below it: bias + confidence, market state, the actual trail-stop price, order flow, flow toxicity, volatility context, and a plain "what to do" line.
Treat the coloured trail as a structure-based stop while the market state is a trend; when the state leaves trend, the trail disappears by design.
The imbalance zones show where unfilled activity sits; fresh, tapped and breaker levels are colour-coded (see the on-chart legend).
Edge-calibration panel (bottom-right): for transparency it scores past signals against a regime-matched base rate and reports EDGE = Hit − Base with a 95% confidence interval. Read the Edge column, not the raw hit-rate. This is descriptive of the past on your symbol — not a backtest and not a forward guarantee.
Key-info panel (top-left): instrument, timeframe, the live data source (see honesty note), threshold, ATR and level counts.
Honest note on data (please read)
TradingView exposes no true tick-by-tick aggressor delta and cannot build custom bars, so delta here is a proxy: signed intrabar volume taken from the finest lower timeframe your data plan returns — 1-second where available, otherwise 1-minute — falling back to bar-shape when no lower-timeframe data exists. The live source is shown as "Delta source" in the Key-info panel, so you always know which mode is active. Non-repaint: the delta clock advances and structure/regime/signals resolve only on confirmed bars; the trail line itself updates within the forming bar as a current estimate.
Originality
The novelty is the synthesis and coupling, not any single classical block. A participation clock is used to gate imbalance detection; order flow is used to adjudicate level survival; regime is used to route the entire read; and the whole thing collapses into one trailing level plus a decision dashboard and a self-calibration panel. Every raw input is user-selectable so the framework generalises across markets.
Concept credits
This tool synthesises well-established, publicly documented ideas; credit to their originators:
Information / volume-driven bars & VPIN flow toxicity — Marcos López de Prado; Easley, López de Prado & O'Hara.
Efficiency Ratio (trend vs. noise) — Perry J. Kaufman.
Trade-side classification (tick rule) — Lee & Ready.
Market impact & absorption (square-root law) — Almgren; Tóth & Bouchaud.
Wilson score interval (small-sample proportion CI) — E. B. Wilson.
Imbalance / fair-value-gap and trailing-stop concepts are long-standing, widely used market-structure ideas. The synthesis and the Pine implementation are the author's own.
Exported outputs (for use in other scripts)
Available via input.source() in any other indicator, with clean generic names: Bias Score (signed conviction, ±10), Trail Stop, Trail Direction, Regime State, Confidence, Leading Strength, CVD Slope, Flow Toxicity, Cumulative Delta, Volatility ROC, Volatility Bias.
Disclaimer
For research and education only. This is an analytical tool — not financial advice, not a signal service, and not a guarantee of future results. No indicator has an inherent edge; validate with your own testing, apply realistic costs, and manage risk. You are solely responsible for your trading decisions. Indicador

Buyer Control / CVD + Volume Divergence Score v6 (CPeletz)This Pine script is beautiful. The ultimate **buyer/seller control warning system**. It does not predict the future by itself. It watches whether price, volume, and CVD-style buying pressure are agreeing or starting to split apart.
The simple version:
> **Red line = buyers may be losing control.**
> **Green line = sellers may be getting exhausted.**
> **Blue line = price and CVD are agreeing or disagreeing.**
> **Bear Div / Bull Div markers = possible reversal warnings.**
## 1. It builds a fake/proxy CVD
True CVD uses real market buys vs market sells. TradingView usually does not give that on normal candles, so your script estimates it.
It does this:
```pinescript
if close > open
signedVol = volume
else if close < open
signedVol = -volume
else
signedVol = 0
```
So:
* Green candle = count volume as buying pressure
* Red candle = count volume as selling pressure
* Then it adds that up over time with `ta.cum()`
That creates:
```pinescript
cvd = ta.cum(signedVol)
```
So your CVD line is basically:
> “Is volume building more on green candles or red candles?”
It is not perfect order flow, but it is useful for spotting pressure shifts.
## 2. It smooths the CVD
Then it smooths CVD with an EMA:
```pinescript
cvdSmooth = ta.ema(cvd, 5)
```
This makes it less noisy so the script does not overreact to every candle.
## 3. It calculates price slope and CVD slope
This is one of the most important parts.
```pinescript
priceSlope = ta.linreg(close, slopeLen, 0) - ta.linreg(close, slopeLen, 1)
cvdSlope = ta.linreg(cvdSmooth, slopeLen, 0) - ta.linreg(cvdSmooth, slopeLen, 1)
```
In plain English:
* Is price trending up or down?
* Is CVD trending up or down?
The dangerous setup is:
> **Price slope up, CVD slope down.**
That means price is rising, but buying pressure is fading.
That is buyer exhaustion.
## 4. It calculates price/CVD correlation
```pinescript
corrCvd = ta.correlation(ta.change(close), cvdDelta, corrLen)
```
This checks whether price movement and CVD movement agree.
Correlation ranges from:
* **+1.00** = price and CVD strongly agree
* **0.00** = no clear relationship
* **-1.00** = price and CVD are moving opposite
Then your script converts it into a 0–100 visual score:
```pinescript
corrScore = (corrCvd + 1.0) * 50.0
```
So:
* **100** = very strong agreement
* **50** = neutral/choppy
* **0** = strong disagreement
This is your blue line.
If price is rising but the blue line is falling hard, the rally may be unhealthy.
## 5. It checks volume strength
```pinescript
volRatio = volume / averageVolume
```
This tells you whether current volume is strong or weak compared to normal.
Examples:
* **0.50x** = half normal volume
* **1.00x** = normal volume
* **2.00x** = double normal volume
A breakout on low volume is suspicious.
A dump on high volume is more serious.
## 6. It finds swing highs and swing lows
This part:
```pinescript
ph = ta.pivothigh(high, pivotLen, pivotLen)
pl = ta.pivotlow(low, pivotLen, pivotLen)
```
It detects local tops and bottoms.
If `pivotLen = 5`, the script waits for a swing high/low confirmed by 5 candles on each side.
That means the divergence markers appear late by design, because Pine needs confirmation.
## 7. It detects bearish divergence
Bearish divergence means:
> Price makes a higher high, but CVD or volume makes a lower high.
That tells you buyers pushed price higher, but the pressure behind the move was weaker.
The script checks:
```pinescript
currPH > prevPH and currPHCvd < prevPHCvd
```
That means:
* Current price high is higher than previous high
* But current CVD is lower than previous CVD
That creates a **Bear Div** marker.
Bear Div means:
> “Do not chase long. Buyers may be weakening.”
It does **not** mean instant short.
## 8. It detects bullish divergence
Bullish divergence means:
> Price makes a lower low, but CVD improves or sell volume weakens.
The script checks:
```pinescript
currPL < prevPL and currPLCvd > prevPLCvd
```
That means:
* Price made a lower low
* But CVD made a higher low
That creates a **Bull Div** marker.
Bull Div means:
> “Sellers may be weakening. Watch for reclaim.”
It does **not** mean instant buy.
## 9. It builds the Buyer Loss Score
This is the red line.
The script adds points when bearish warning signs appear.
### Buyer Loss gets +25 if:
```pinescript
priceSlope > 0 and cvdSlope < 0
```
Price is rising but CVD is falling.
That is a big warning.
### Buyer Loss gets +20 or +10 if:
```pinescript
corrCvd < 0
corrCvd < 0.25
```
Price and CVD are not agreeing.
### Buyer Loss gets +10 if:
```pinescript
close > close and volRatio < 0.80
```
Price is rising on weak volume.
### Buyer Loss gets +10 if:
```pinescript
rsi > 55 and rsiSlope < 0 and priceSlope > 0
```
Price is rising, RSI is above 55, but RSI is weakening.
### Buyer Loss gets +25 if:
```pinescript
recentBearDiv
```
A recent bearish divergence happened.
### Buyer Loss gets +10 if:
```pinescript
close < emaControl
```
Price is below the control EMA.
So the red line is basically saying:
> “How many buyer weakness signs are stacking together?”
## 10. It builds the Seller Exhaustion Score
This is the green line.
It adds points when sellers may be running out of pressure.
Seller Exhaustion rises when:
* Price is falling but CVD is rising
* Bullish divergence appears
* Price drops on weak volume
* RSI starts improving while price is still weak
* Price reclaims the EMA
So the green line tells you:
> “Are sellers weakening enough for a possible bounce?”
## How to trade it
### For longs
Good long environment:
* Buyer Loss under **40**
* Seller Exhaustion rising after a dump
* Bull Div appears
* Price reclaims EMA/VWAP/midline
* CVD/correlation improves
* Price makes a higher low
Bad long environment:
* Buyer Loss above **65**
* Bear Div appears
* Price below EMA/VWAP/midline
* Blue correlation line falling
* CVD not confirming price
## Main score meanings
| Score | Meaning |
| --------------------------- | ----------------------------- |
| **Buyer Loss 0–40** | Buyers okay |
| **Buyer Loss 40–65** | Buyers stalling / caution |
| **Buyer Loss 65+** | Buyers likely losing control |
| **Seller Exhaustion 0–40** | Sellers still okay |
| **Seller Exhaustion 40–65** | Sellers slowing |
| **Seller Exhaustion 65+** | Possible bottom/reclaim setup |
## Important limitation
Your script is not true CVD.
It is a **candle-direction CVD proxy**.
So it can help you see pressure changes, but you should always confirm with:
* price structure
* support/resistance
* VWAP or Bollinger basis
* BTC direction
* actual volume
* reclaim/failure candles
## The cleanest way to use it
For a top/reversal warning:
> **Bear Div + Buyer Loss over 65 + price breaks EMA/VWAP = buyers lost control.**
For a bottom/reclaim warning:
> **Bull Div + Seller Exhaustion rising + price reclaims EMA/VWAP = sellers may be losing control.**
The script’s job is not to tell you “buy now” or “sell now.”
Its job is to tell you:
> **Is the move healthy, or is pressure starting to diverge?**
Indicador

Flow-Efficiency OscillatorFlow-Efficiency Oscillator
Overview
How much order flow did it cost to move price one tick? It measures signed volume (delta) consumed per tick of travel, then percentile-ranks that cost into a 0–100 read. High = expensive / heavy (lots of delta, little movement — the signature of absorption). Low = cheap / efficient (little delta, large movement — thin, frictionless travel). A study of effort-versus-result in the tape — not a directional signal.
Why these parts are ONE tool (mashup rationale)
A CVD line shows net flow; a volume study shows size; neither expresses the exchange rate between flow and price — and that ratio is where absorption hides. This chains: lower-timeframe delta reconstructs intrabar effort → a cost ratio divides effort by tick travel → percentile ranking makes it universal (0–100) → an absorption flag fires only when cost is high and flow leaned hard one way yet price stalled → the harness tests whether price then moves against the absorbed aggressor. Effort alone is just volume; the ratio without ranking isn't comparable; the flag without calibration is folklore.
How it works
Inside each bar, lower-timeframe bars are signed by the tick rule and summed into a bar delta; their absolute volume is total aggression. Cost = |delta| / max(tick travel, floor), smoothed, then percentile-ranked over a lookback (50 = median cost). Absorption arms when cost is in the high band while net delta is strongly one-sided. The harness logs each event and checks a ≥ k×ATR move against the aggressor a fixed horizon later.
How to use
High band (above the upper guide) = absorption / heavy tape, where a strong push is being eaten and reversals have context; low band = efficient tape, where moves travel freely and continuation is favoured. The absorption dots mark high-cost, one-sided stalls. Then read the Edge row. Context, never a standalone trigger.
Originality
CVD and the tick rule are public; the original work is the cost-per-tick exchange rate, its percentile normalisation, the absorption logic, and the forward calibration of absorption→reversal. No third-party code is reused.
Concept credit
Tick-rule trade sign — Lee & Ready (1991). Flow-toxicity / cost-of-trading framing draws on Easley, López de Prado & O'Hara. The ratio, percentile read and harness are this script's own.
Honesty / limitations
The buy/sell split is a tick-rule estimate from lower-timeframe bars, not true bid/ask data — delta is approximate. This is an intraday tool: it needs a timeframe below the chart's, warms up slowly, and is heavier than a single-series oscillator; on daily+ or volume-less feeds the read degrades. Edge figures are in-sample, no costs — context, not a backtest.
Disclaimer
Research / educational only. NOT financial advice; no guarantee of profitability. Trading carries risk of loss. Test out-of-sample. The author accepts no liability. Indicador

Multi-Factor Divergence MatrixMulti-Factor Divergence Matrix
OVERVIEW
Most divergence tools read one oscillator against price. The Multi-Factor Divergence Matrix reads fifteen independent lenses at once, standardizes them onto a single shared standard-deviation (sigma) scale, and then organizes them into a structure: lenses roll up into 14 aspects (distinct questions), aspects roll up into 6 families (factor classes), and families roll up into one composite. Divergence is detected five different ways on that construction, and a built-in calibration harness scores whether each method has actually carried any edge on your instrument.
The core idea: a price move is more trustworthy when many independent reads confirm it, and a divergence is more meaningful when it shows up across different kinds of information — not just three flavours of momentum that all say the same thing.
WHY THE COMPONENTS BELONG IN ONE SCRIPT (mashup rationale)
This is a deliberate multi-factor engine, not indicators stacked side by side. Every part answers the same question — is this price move confirmed, and by how broad a set of independent reads? — and each fixes a blind spot of the others:
A single oscillator can only diverge one way. Fifteen lenses across six families let price be unconfirmed by momentum, by trend efficiency, by location, by volatility, by order flow, or by cross-asset carry — independently.
Raw factor-stacking double-counts. Standardizing every lens to one sigma scale makes them directly comparable, and grouping correlated lenses into aspects (then families) means consensus is counted where it carries independent information, not where it merely repeats.
One detection method misses what another catches. Pivot divergence is precise but lags; slope fires earlier; correlation is continuous; sequential catches structured exhaustion; the intra-family split is often the very first crack. Run together, they cover the ways divergence actually appears.
Assertions are cheap. The calibration harness ties the whole construction back to realized forward outcomes, per method, so the tool reports whether its own signals carry edge rather than claiming they do.
Remove any one layer and the central question is answered less completely — which is what makes them one tool.
HOW IT WORKS
The 15 lenses → 14 aspects → 6 families
Momentum — oscillatory (RSI + Know Sure Thing), velocity (low-lag two-pole strength), stationary (fractional-difference of log price)
Trend / Efficiency — path quality (Kaufman efficiency ratio), extension (SAR distance in ATR units), rollover (dual-horizon efficiency gap)
Location / Mean — volume-anchored (VWAP deviation), geometric (linear-regression deviation)
Volatility — realized expansion (directional range), implied-vs-realized (variance-risk-premium spread)
Flow / Volume — net pressure (cumulative signed-volume delta, lower-timeframe estimated), volume-weighted (Money Flow Index)
Cross-Asset — carry (futures-vs-spot basis), fear (volatility-index vs price)
Each lens is z-scored over a rolling window (up = bullish). Correlated lenses that answer the same question (e.g. RSI and KST) are averaged into one aspect — the anti-redundancy step. A family agrees only when a majority of its filled aspects align; when its aspects disagree it is flagged SPLIT.
Two consensus axes, both at family resolution, auto-scaled by timeframe
Extreme-count — how many families are stretched to their extreme.
Divergence-count — how many families are diverging from price right now.
Five detection methods
Pivot — regular, hidden, exaggerated (equal-extreme) and triple divergence on the composite.
Slope — price-vs-composite regression-slope sign disagreement (fires earlier than pivots).
Correlation — rolling price-composite correlation flipping negative (continuous, always-on).
Sequential — a structured RSI exhaustion pattern (three deeper pushes, then a turn).
Leading — the intra-family SPLIT, often the first warning before a family flips.
Calibration. Each event is a directional hypothesis, queued and resolved a fixed horizon later versus an ATR threshold, then compared with the unconditional same-horizon base rate. The dashboard reports, per method: number of events, Hit %, and Edge = Hit − Base. Events are logged and resolved on confirmed bars only.
HOW TO USE
The dashboard has two modes. Compact (default) shows the decision essentials: the composite zone, the two consensus counts (Stretched X/6 · Diverging Y/6), a one-line family summary (bull / bear / split), and the single best-calibrated method with its Edge. Pro expands this to every family row (vote arrow, aspect agreement, SPLIT flag) and every per-method calibration class. In both, a high divergence-count backed by clean family agreement is strong context; the Edge figure tells you whether that read has actually preceded a move on this symbol and timeframe. Treat consensus as context, never a standalone trigger.
UNIVERSAL ACROSS MARKETS
Price, high, low, the VWAP source, the spot reference symbol and the volatility symbol are all inputs, so the engine runs on any instrument and timeframe. Volume-based lenses (VWAP, flow, MFI) need real traded volume — use the futures contract, not a cash index. Defaults target NSE NIFTY index futures intraday with an NSE:NIFTY spot reference and NSE:INDIAVIX; lenses without data quietly drop out and the consensus scales to whatever stays active.
ORIGINALITY
The individual techniques are public and credited below. The original work is the integration: standardizing fifteen heterogeneous reads onto one sigma axis, the aspect → family → composite roll-up that counts agreement only where it is independent, the dual extreme-and-divergence consensus, the surfacing of intra-family disagreement as a leading signal, and the forward base-rate calibration over every detection method. No third-party Pine code is reused.
CONCEPT CREDIT
RSI, Parabolic SAR, ATR, DMI — J. Welles Wilder. Know Sure Thing — Martin J. Pring. Efficiency Ratio — Perry J. Kaufman. Money Flow Index — Quong & Soudack. VWAP and cumulative volume delta — standard public market-microstructure concepts. Fractional differentiation — the long-memory / stationarity literature (Hosking 1981; adapted for finance by M. López de Prado). Two-pole low-pass smoothing — John F. Ehlers. The basis is explained by the cost-of-carry framework (N. Kaldor 1939; H. Working 1948–49). Variance risk premium — the implied-minus-realized literature. Linear regression and price/oscillator divergence are long-established public techniques. Not affiliated with, nor endorsed by, any third party.
HONESTY / LIMITATIONS
Consensus is context, not a trigger. Independence is managed, not perfect — lenses inside a family still share inputs, which is exactly why consensus counts families and aspects rather than raw lenses, and why a high count is never proof. The Edge figures are in-sample, close-to-close, with overlapping forward windows and no costs — descriptive context, not a verified backtest. An Edge near zero, negative, or unstable across timeframes is the harness honestly telling you the method has no reliable edge on that instrument; do not tune parameters until it turns green — that is curve-fitting. Divergence and reversals confirm a few bars after their pivot (inherent to honest pivot detection). Nothing here predicts price.
DISCLAIMER
Research and educational tool only. NOT financial advice and NO guarantee of profitability or accuracy. Indicators describe past behaviour; they do not predict the future. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use of this script. Indicador

Order-Flow Profile Microstructure & Calibrated SweepsOrder-Flow Profile — Footprint, Microstructure & Calibrated Sweeps
A single-pane volume profile that reconstructs intrabar buy/sell activity, renders it as a footprint / delta heatmap with Point of Control and a 70% Value Area, layers a stack of market-microstructure factors over the same price bins, and then forward-tests every reversal signal it emits against realized outcomes. The dashboard reports measured edge with confidence intervals — not asserted edge.
It runs on any liquid symbol and any intraday timeframe. Defaults are tuned for index futures (e.g. NIFTY / BANKNIFTY); a few inputs adapt it to other instruments.
What it plots
Order-flow profile drawn to the right of price: each price bin colored by who controlled it (delta) with brightness scaled to volume, or a classic split footprint. The peak-volume row is the POC; a 70% Value Area is built outward from the POC.
Low-volume nodes / voids and four quadrant deltas that localize where buying and selling concentrated within the range.
A VPIN heat-glow background whose brightness rises with flow toxicity.
Sweep tags (ABS / EXH / DIV / REJ) at liquidity extremes, and a ⚡ reclaim-confirmed liquidity-sweep marker for the high-conviction stop-run-and-reclaim subset.
A calibration / key-reads dashboard (Compact by default, Pro on demand) that adapts its colors to your chart's background luminance.
Why these components belong in one script (component rationale)
This is not a bundle of unrelated indicators stacked together. Every component describes one object — the order-flow auction taking place inside the price profile — and each measures a different facet of it. They share one substrate (the price bins) and one validation spine (the calibration engine):
The profile says WHERE volume traded. POC, Value Area and voids are the structural skeleton — the price levels that matter.
Trade classification splits that volume into buy vs sell, giving every bin a delta. Bulk Volume Classification (a Student-t CDF on the standardized intrabar move) is used by default; on Premium plans, native bid/ask footprint can replace it, feeding the same bins. A tick rule classifies the same intrabars in parallel and the agreement % is reported, so you know when the trade-side read is fragile.
The microstructure factors qualify HOW that flow behaves at those levels. VPIN (informed vs balanced), multi-level OFI (depth-weighted imbalance across the bins), Kyle's λ and Amihud (price impact / illiquidity), and √-law absorption (flow soaked up vs fragile) each answer a question the raw profile cannot. They are computed over the very bins the profile draws.
The sweep layers detect reversals AT those levels — an order-flow taxonomy (absorption / exhaustion / divergence / rejection) plus a structural stop-run-and-reclaim. A Hawkes self-exciting intensity flags when sweeps are clustering (cascade risk).
A correlation-aware fusion (Kish design-effect shrinkage) combines the firing sweep's realized edge with the concurrent absorption and toxicity tells into a single reversal probability — shrinking redundant, correlated evidence so agreement among related signals cannot masquerade as independent confirmation.
The calibration spine forward-resolves every sweep and reports its hit rate versus base rate with a Wilson confidence interval. This is what ties the stack together: a factor only earns trust if the resolved outcomes say it does.
Remove any one layer and the others lose context: the profile without classification is just a volume histogram; the microstructure factors without the profile have no levels to attach to; the sweeps without calibration are unverified claims. Together they are a single, self-checking read of the auction.
How it works (mechanics)
Intrabar data. Lower-timeframe OHLCV is pulled with request.security_lower_tf (no lookahead). The lower timeframe is auto-derived from the chart timeframe or set manually.
Trade side. Bulk Volume Classification assigns each intrabar a buy fraction from a Student-t CDF of its standardized price change; delta = buy − sell. Where a Premium/Ultimate plan allows it, native request.footprint() real bid/ask volume per price replaces the reconstruction and feeds the identical bins.
Profile build. On the last bar, the chosen lookback of confirmed bars is accumulated into price bins; POC and the 70% Value Area are derived, voids and quadrant deltas computed.
VPIN. Volume is partitioned into equal-volume buckets; the average order imbalance across the last N buckets is the 0–1 toxicity read (with a percentile and background glow).
Impact factors. Stationarized (log-compressed, z-scored) OFI; depth-weighted multi-level OFI across the bins; Kyle's λ as the regression slope of return on signed flow; Amihud illiquidity as |return| per traded value.
Absorption. A displacement-normalized form and a √-law form (realized impact vs Y·ATR·√(|Δ|/V)): below the prediction = passive absorption / reversal candidate; above = fragile expansion.
Sweeps & fusion. At a swept extreme the bar is classified ABS / EXH / DIV / REJ; a Hawkes intensity tracks clustering; a Kish-decorrelated log-odds fusion outputs one reversal probability. Separately, a reclaim-confirmed liquidity sweep fires when price runs a confirmed swing pivot, closes back inside recovering a minimum fraction of the run, on a volume spike.
Calibration. Each sweep is queued and resolved a fixed horizon later against a moveATR·ATR threshold, recorded in R-multiples (MFE / MAE). The dashboard shows, per class: sample count, Hit% ± Wilson interval, Base% (the unconditional reversal rate over the same horizon), Edge (Hit − Base, starred at 95% significance), and average MFE / MAE.
Non-repaint: all detection is on confirmed bars, lower-timeframe arrays are confirmed intrabars, no dynamic-length built-ins are used, and the profile is drawn on the last bar from confirmed history. Pivots used by the liquidity sweep are confirmed before they can be swept.
What makes it original
It is built around calibration, not assertion. Most order-flow tools print a delta, a "confidence," or a footprint and leave it there. Here every reversal signal is forward-resolved against realized price and reported with a base rate and a Wilson interval, so the dashboard distinguishes a real edge from a small-sample illusion.
The agreement between Bulk Volume Classification and a tick rule is surfaced openly — a known weakness of reconstructed order flow is shown rather than hidden.
The microstructure factors are computed over the profile's own bins and decorrelated before fusion, so correlated flow signals don't inflate confidence.
It degrades gracefully from native exchange footprint (Premium) to reconstruction (every plan) with no change to the visual or the workflow.
All factor implementations are original Pine re-derivations of published methods; no code from other scripts is used.
How to use it
Apply to a liquid symbol on an intraday timeframe. Read the profile to see where volume concentrated (POC, Value Area, voids).
Watch the sweep tags and ⚡ liquidity-sweep markers at the edges of the range — these are reversal hypotheses, not guarantees.
Before trusting a sweep class, check its row in the calibration panel (switch the dashboard to Pro): is its Hit% above Base%, is the edge starred (significant), and is the Wilson interval tight enough to mean something?
Use the VPIN glow and fused reversal probability as context: bright background = one-sided / informed flow, which leans toward continuation and makes fades riskier.
The Compact dashboard summarizes the key reads (POC, VPIN, best calibrated edge, fused probability, liquidity-sweep status, auction efficiency); Pro expands the full per-class calibration table and every microstructure row.
Hidden EXP_* data-window series are provided for chaining into other scripts via input.source().
Data & markets
Works on whatever symbol the chart shows — nothing is hard-coded to an exchange or instrument. Defaults suit index futures on an intraday chart. For other instruments, adjust the Profile & Data Source group (lower-timeframe division, profile lookback) and, on a supporting plan, the native footprint settings. Reconstructed order flow is most reliable on liquid instruments with continuous volume.
Concept credits
This script operationalizes published methods; all implementations are original re-derivations.
Tick rule / trade sign — Lee & Ready (1991)
Bulk Volume Classification & flow toxicity (VPIN) — Easley, López de Prado & O'Hara (2012)
Order-Flow Imbalance — Cont, Kukanov & Stoikov (2014)
Multi-level / integrated OFI — Xu, Gould & Howison (2018)
Price impact (λ) — Kyle (1985)
Illiquidity ratio — Amihud (2002)
Self-exciting intensity — Hawkes (1971); Bacry, Muzy et al.
Square-root impact law — Almgren et al.; Tóth, Bouchaud et al.
Effective-sample decorrelation — Kish design effect
Market / auction profile (POC, Value Area) — Steidlmayer
Confidence interval — Wilson score interval (1927)
Disclaimer
For educational and informational purposes only. This is an analytical tool, not financial advice and not a solicitation to trade, and it is not a guarantee of future results. Order-flow classification from OHLCV is an estimate, not the true tape — without a Level-2 order book every delta here is a proxy (native footprint excepted). Always do your own research and manage risk; paper-trade before committing real capital. Indicador

Institutional Liquidity Sweep [PickMyTrade]Institutional Liquidity Sweep identifies institutional stop-hunt reversals by measuring five structural microstructure factors at every confirmed swing-level sweep and combining them into a single, readable Confluence Score. When the score clears a configurable threshold — and the sweep aligns with an active Order Block — the indicator fires a directional signal with a score label, an SL/TP projection, and an auto-mitigating OB zone on the chart.
Unlike fixed-threshold crossover tools, this indicator does not assume that every wick below a swing low or above a swing high is meaningful. It asks a structural question instead: given the depth of the sweep, the absorption shown in order flow, the session timing, and whether an institutional Order Block was sitting at that level — how strong is the reversal case? Five factors answer that question and a weighted score between 0 and 100 summarises the result on every bar.
────────────────────────────────────────────────────────
🔷 WHAT IT MEASURES
🔸 Swing-Level Sweep Detection
A bullish sweep is confirmed when the current bar's wick pierces the N-bar swing low while the close returns above it. A bearish sweep is the mirror: wick above the swing high, close back below. The swing level uses a confirmed lookback — no current-bar values enter the swing calculation — making the sweep detection fully non-repainting. This single structural requirement gates the entire indicator: the five factors and the Order Block check only matter on a bar that has already swept a swing level.
🔸 F1 — Wick Rejection Purity (weight 28%)
How much of the sweep wick was recovered within the same bar? A bar that sweeps 20 points below the swing low but closes only 2 points above it has poor rejection. A bar that sweeps 20 points and closes back near the top of its range has high rejection purity. This factor is z-score normalised over a rolling window so that the same numeric value carries the same weight regardless of instrument volatility.
🔸 F2 — Volume Participation (weight 20%)
Volume at the sweep bar is z-score normalised against recent history. Elevated volume confirms institutional participation: a stop hunt that clears retail orders but attracts heavy buy (sell) pressure is more likely to reverse than one with below-average volume. A sweep on thin volume gets a low F2 score even if the rejection wick looks clean.
🔸 F3 — CVD Net Absorption (weight 25%)
Cumulative volume delta tracks the net order flow direction using the close-position formula bull_vol = volume * (close - low) / (high - low) . The single-bar delta at the sweep bar is z-score normalised and sign-adjusted: a bullish sweep wants a positive delta (buyers absorbed the down-spike); a bearish sweep wants a negative delta (sellers absorbed the up-spike). When order flow and price action agree on the reversal, F3 scores high. When they disagree — price sweeps down but sellers are still dominant — F3 penalises the composite score.
🔸 F4 — Structural Recovery (weight 17%)
How far did the close reclaim the swept swing level relative to the depth of the sweep? If a bar sweeps 30 points below the swing low and closes 25 points above it, recovery is strong. If it closes only 2 points above the swing level having swept 30 points, recovery is weak. This factor rewards bars that decisively reclaim the institutional level rather than barely scratching back above it.
🔸 F5 — Session Window (weight 10%)
Liquidity events during the London open (07:00–10:00 UTC by default) and the New York open (13:00–16:00 UTC by default) carry a higher institutional weight than off-peak sweeps. This factor scores 1.0 during the London window, 0.85 during the NY window, and 0.45 at all other times. Session hours are configurable in UTC and the session windows are highlighted on the chart.
────────────────────────────────────────────────────────
🔷 THE COMPOSITE SCORE
Each factor is normalised to a 0–1 scale using z-score transformation. The five normalised scores are then combined with the weights above into a single composite score from 0 to 100:
Score = (0.28 × F1 + 0.20 × F2 + 0.25 × F3 + 0.17 × F4 + 0.10 × F5) × 100
An Order Block alignment bonus (configurable, default 15 points) is added on top when the sweep level coincides with an active OB zone, with the score capped at 100. The threshold (default 65) is the minimum score required to fire a signal. Raising the threshold to 75–80 restricts signals to the highest-conviction sweeps; lowering it to 50 produces more signals on weaker structure.
────────────────────────────────────────────────────────
🔷 ORDER BLOCKS
🔸 Detection
A bullish Order Block is the last bearish candle before a sequence of N consecutive bullish candles (an upside impulse). A bearish Order Block is the last bullish candle before N consecutive bearish candles (a downside impulse). The impulse candle count is configurable (default 3). Only confirmed, closed bars enter the OB detection — no current-bar data is used.
🔸 Zones
Each active OB is drawn as a persistent price zone box extending from the OB candle's high to its low. Bull OB zones use the bull colour; bear OB zones use the bear colour. When a new OB forms, the previous OB of the same direction is replaced. The right edge of each box extends bar-by-bar until mitigated.
🔸 Mitigation
A bull OB is mitigated when price closes below the bottom of the zone. A bear OB is mitigated when price closes above the top. On mitigation the box is deleted and the zone is deregistered. The info table shows "Aligned" when the sweep level currently sits inside an active OB zone, "Active" when an OB exists but is not being swept, and "None" when no OB is registered.
🔸 Score Bonus
When a sweep aligns with an active OB — meaning the swept swing level falls within the OB zone's price range — the composite score receives the OB bonus. This reflects the structural significance of a sweep-and-reversal occurring at a previously identified institutional reference level.
────────────────────────────────────────────────────────
🔷 SESSION WINDOWS
London and New York open windows are highlighted on the chart as faint background tints (yellow for London, teal for NY). These are the hours during which institutional desks are most active and liquidity sweep events are most frequently observed. Session highlighting can be toggled off independently of the session weight applied to F5.
────────────────────────────────────────────────────────
🔷 SIGNAL LOGIC
A long signal fires when three conditions are simultaneously true on the same bar:
A bullish sweep is detected (wick below the N-bar swing low, close above it)
The composite score meets or exceeds the threshold
Price is above the trend EMA (macro direction filter)
A short signal fires under the symmetric conditions using the swing high and requiring price to be below the EMA. The signal is edge-triggered — it fires once on the first qualifying bar and resets when conditions are no longer met. The signal label shows "ILS" followed by the rounded score (e.g. ILS 72 ).
────────────────────────────────────────────────────────
🔷 HOW TO READ IT
🔸 Confluence Pressure Band
A fill band extends from the trend EMA to ±1 ATR. The opacity of the fill scales continuously with the composite score — a faint band indicates a low-scoring environment; a deep saturated band indicates a high-scoring environment even before a sweep fires.
🔸 Entry Shapes
Circles indicate high-conviction signals (score ≥ 80); triangles indicate standard signals (score ≥ threshold). The shape appears at the sweep bar with a score label. Shapes are coloured at full intensity for high conviction and at 75% opacity for standard signals.
🔸 OB Zone Boxes
Semi-transparent filled boxes mark active Order Block zones. They extend to the right on every bar until mitigated by a close through the zone boundary. When a sweep lands inside a box, the OB bonus is added to the score at that moment.
🔸 Session Highlights
Faint yellow and teal background tints mark London and NY open windows respectively. Sweeps outside both windows score lower on F5 and require the other four factors to compensate.
🔸 Info Table
The top-right table shows seven live values at every bar: the composite score, all five normalised factor scores (0–1), the active session, and the OB zone status. Factor scores above 0.60 are highlighted in lime green.
🔸 SL / TP Lines
Dashed red and green lines mark the ATR-based stop loss and take profit levels at each signal bar. The SL is placed beyond the sweep wick by a configurable ATR multiple; the TP is set at the SL distance multiplied by the risk:reward ratio. Both lines extend 8 bars to the right and do not repaint.
────────────────────────────────────────────────────────
🔷 INPUTS
🔸 Sweep Detection
Swing Lookback — N-bar window defining the swing high/low that must be swept. Default 20.
🔸 Confluence Score
Score Threshold — minimum composite score (0–100) to fire a signal. Default 65.
Normalisation Window — rolling window for z-score normalisation. Default 50.
Order Block Score Bonus — additional points when sweep aligns with an OB zone. Default 15.
🔸 Order Blocks
Show OB Zones — toggle OB box drawing.
Impulse Candles Required — consecutive same-direction candles to identify an impulse. Default 3.
🔸 Session Windows
Show Session Highlights — toggle background session tints.
Chart Timezone — must match your chart timezone for accurate session hour detection.
London Open Hour / NY Open Hour — start of each window in UTC. Defaults: London 7, NY 13.
Window Width — hours each session window spans. Default 3.
🔸 Signal Levels
Show SL / TP Lines — toggle projection lines.
SL ATR Multiplier — stop loss distance as ATR multiple. Default 1.5.
Risk : Reward — TP as a multiple of the SL distance. Default 2.0.
ATR Period — Default 14.
Trend EMA Period — macro direction filter. Default 50.
🔸 Visual / Display
Bull / Bear Colour — base colours for all directional elements.
Confluence Pressure Band — toggle the EMA fill band.
Zen Mode — hides all text labels; only shapes and zones remain.
Show Info Table — toggle the top-right factor breakdown table.
────────────────────────────────────────────────────────
🔷 REQUIREMENTS AND LIMITATIONS
The indicator requires a minimum of Normalisation Window bars before z-score statistics are meaningful. On short-history charts or when first applied, z-scores will be zero and the score will rely primarily on F5 (session timing).
CVD is estimated from the close-position formula — a synthetic approximation of net order flow, not true bid/ask volume. On illiquid instruments or timeframes where intrabar price travel is minimal, the CVD delta is noisy and F3 will contribute less discriminative power.
Order Block detection uses a simplified impulse model (N consecutive same-direction closes). The single-active-OB-per-direction design is intentional: the indicator tracks the most recent OB, not a full library of zones.
Session timing is meaningful on intraday timeframes (15M through 4H). On daily or weekly charts, F5 will score at its off-peak value — toggle off session highlights on higher timeframes.
The composite score is a relative measure, not an absolute probability. A score of 72 means the current sweep bar shows strong structural confluence relative to normalised distributions — it does not imply a 72% probability of reversal.
────────────────────────────────────────────────────────
Built natively in Pine Script® v6. Five-factor confluence scoring using z-score normalisation with rolling statistics, non-repainting swing-level sweep detection, auto-mitigating Order Block zones, and session-weighted structural analysis. No external libraries, no data feeds, no fixed lookback arrays.
Open source — Mozilla Public License 2.0. Published by PickMyTrade_Official. Indicador

Multi Factor Divergence Confluence OscillatorMulti-Factor Divergence Confluence Oscillator
What it is
This indicator detects price/oscillator divergence on four independent indicator families at the same price pivots and reports how many of them agree. The lower-pane histogram shows the signed agreement count — positive (bullish) above the zero line, negative (bearish) below — and a signal is flagged only when at least N independent families diverge at the same swing. It is a context tool that measures agreement, not a buy/sell system, and it places no orders.
Why these components are combined (and why it is not just stacked indicators)
Divergence on a single oscillator is a weak, noisy signal. The instinctive "fix" is to stack several oscillators and look for agreement — but stacking RSI, Stochastic, MACD and similar tools does not create real confluence, because they are all rate-of-change of price. They are highly correlated, so a divergence on one almost always coincides with the others. That is one witness counted several times, which feels like confirmation while adding almost no new information.
Meaningful confluence requires independent witnesses. This script therefore measures divergence on four families chosen specifically because each looks at a different dimension of the same bar, and each covers a blind spot of the others:
Momentum — Relative Strength Index. The classic rate-of-change read. It says nothing about who is transacting or how far price has travelled.
Volume — Normalized Cumulative Volume Delta. Detrended, standardized signed volume — an order-flow read that is independent of price geometry. (Signed volume is estimated; see Limitations.)
Volatility — Parabolic-SAR-to-price extension, in ATR units. How stretched the current trend leg is relative to its trailing stop, normalized by volatility — a read that ignores both momentum and volume.
Forecast — price minus its linear-regression forecast. A z-scored "how far has price departed from its own fitted path" term, independent of the three above.
All four are rescaled to share polarity (up = bullish), so a single divergence rule applies to every engine and the counts are directly comparable. Counting agreement across these families is information; counting it within one family is not — that independence is the entire reason these four are combined, rather than four momentum clones.
How the parts work together
Each enabled family is reduced to one bounded, bullish-up oscillator.
At every confirmed price swing (the families share the same price pivots), each family is asked whether it diverges there. Bearish = price makes a higher high while the oscillator makes a lower high; bullish = price makes a lower low while the oscillator makes a higher low.
The number of agreeing families becomes the signed confluence histogram, with glowing tip dots on flagged signals and a connecting line/label on the pane.
A signal flag is raised only at or above the chosen agreement threshold. That threshold can adapt to the chart timeframe — lower timeframes are noisier, so by default 1–5m require four families, 15–60m require three, and above 60m require two.
How to use it
Read the height and sign of the histogram: how many independent families diverge, and in which direction. The flag lines and the optional shaded zones mark where agreement is strong (three or more).
Treat it as context that qualifies your own analysis, not a standalone trigger. A divergence marks where price and a flow/momentum read disagree; it can resolve either way. More agreement is rarer, not guaranteed-better.
The dashboard summarizes the last signal, which families diverged, the active engines, the current threshold, and whether the signed-volume estimate is using lower-timeframe data or the proxy.
Enable/disable any family, switch between regular (reversal) and hidden (continuation) divergence, and tune the pivot, gap and threshold settings to your instrument and style.
What is original
The originality is the integration discipline, not the individual techniques: divergence is measured only across deliberately independent families on one shared set of price pivots and one comparable axis, with an explicit rule that within-family agreement is excluded. The result is a single confluence read that resists the double-counting that ordinary multi-oscillator "confluence" tools fall into, plus a timeframe-adaptive agreement threshold and an honest, configurable, multi-market implementation.
Universal across markets (configurable data source)
The Price / High / Low sources are user-selectable in Settings, so the engine runs on any symbol, asset class or timeframe — equities, futures, forex, crypto or indices. The Volume family needs a symbol that reports real volume; otherwise it falls back to a high/low/close proxy, and the dashboard shows which is active. Defaults are tuned for NSE NIFTY index futures on intraday charts; change the sources, lengths and lower timeframe for any other instrument.
Concept credits
Relative Strength Index and Parabolic SAR — J. Welles Wilder Jr. Cumulative Volume Delta, linear-regression forecasting and price/oscillator divergence are standard, publicly documented techniques. This is an original integration built around those public concepts and is not affiliated with, nor endorsed by, any originator.
Limitations (honest)
Divergence is context, not a trigger. Signed volume is estimated from lower-timeframe sub-bars (or an intrabar proxy), not exchange aggressor data, so the Volume family is an approximation and is unreliable on instruments without real volume. Divergence confirms a few bars after its pivot — inherent to honest, non-repainting pivot detection. Past behaviour does not predict future results.
Disclaimer
For research and educational purposes only. This is not financial advice and carries no guarantee of profitability or accuracy. Indicators describe past behaviour; they do not predict the future. Trading involves risk of loss. Test out-of-sample and make your own decisions.
Indicador

Volume Flow Divergence OscillatorVolume Flow Divergence Oscillator (VFDO)
Volume Flow Divergence Oscillator
A bounded order-flow oscillator that measures whether buying or selling pressure dominates and how stretched it is, then detects price/flow divergences with statistical filtering. Three interchangeable flow engines share one axis so the same read can be cross-checked three independent ways.
Why these components are combined (and why this is not a generic mashup)
Order-flow pressure can be measured several ways, and each has blind spots. The problem this script solves is specific: raw Cumulative Volume Delta (CVD) trends without bound, so classic "swing-high vs swing-high" divergence on it is unreliable — the comparison ends up dominated by the accumulated drift instead of local buying/selling conviction. Stacking more momentum tools (a second RSI, a MACD) would only double-count the same information.
Instead, this tool (a) detrends and standardizes the flow into a bounded, mean-reverting oscillator so divergence becomes valid, and (b) offers three orthogonal lenses on one question — is buying or selling winning, and is it stretched?:
Normalized CVD — cumulative signed volume, detrended (minus its EMA) and divided by the residual's standard deviation. The reading is a z-score of how stretched flow is versus its own recent trend.
CVD-RSI — Wilder's RSI applied to the detrended CVD (not raw CVD, which would pin near 0/100 in a sustained trend). A 0–100 momentum-of-flow read.
MFI (Money Flow Index) — a volume-weighted RSI that does not depend on the signed-volume estimate, so it acts as a genuine independent cross-check.
These three are not redundant: they are different constructions of the same idea. A divergence that appears on all three is far more robust than one that appears on only one — and if they disagree, the "divergence" is construction-dependent noise. That cross-checking is the core purpose of putting them on a shared bounded axis.
Four context modules sit on top, each adding what the raw line cannot:
Filtered divergence — regular and hidden divergence between price pivots and the flow oscillator, gated by a minimum magnitude (marginal wiggles don't count), a maximum bar-distance between pivots (no stale comparisons), and an optional extreme-zone requirement (only count divergences forming from overbought/oversold, where they carry the most meaning). Lines are drawn on the oscillator curve; price marks print at the confirmation bar.
Gradient extreme zones — ±4σ (or 90/10) bands that shade lighter at the edge and darker as flow pushes further out, marking genuinely stretched conditions.
In-band reversal dots — a red/green dot when the oscillator makes a local turn inside an extreme band, flagging that stretched flow is unwinding.
Adaptive dashboard — a compact panel (oscillator value, zone, last divergence, last reversal, data source) that auto-themes to the chart background for legibility on any color scheme.
How signed volume is estimated (honesty)
True aggressor-tagged delta is unavailable on most TradingView feeds, so signed volume here is estimated: per bar it is summed from lower-timeframe sub-bars (each sub-bar's volume signed by whether it closed up or down), falling back to an intrabar OHLC proxy when sub-bar data isn't available. The dashboard's Delta source row shows which is live ("LTF" vs "proxy"). This is the standard approach CVD tools use; it is an estimate, not exchange-tagged order flow.
How to use
Add to any symbol that reports volume. Read it like a bounded flow gauge: above the upper band = buying stretched; below the lower band = selling stretched; midline = balance.
Treat divergences as context, not standalone triggers. A bearish divergence at the upper extreme means buying conviction is fading as price makes a new high.
Cross-check with the Engine selector: confirm a divergence by switching between Normalized CVD, CVD-RSI and MFI. Agreement across all three is the strong case.
Reversal dots mark stretched-flow unwinding — combine with your own price structure and risk rules.
Settings overview
Data Source — lower-timeframe for the delta estimate; selectable High/Low sources for divergence, so the engine fits any instrument.
Flow Oscillator — engine selector, detrend/normalize window, OB/OS, smoothing, RSI/MFI lengths.
Extreme Zones & Reversals — ±4σ band level, band display, reversal dots.
Divergence — magnitude, pivot length, max bar-distance, extreme-zone gate, regular/hidden.
Dashboard & Theme — colors, position, and Auto/Dark/Light theme.
Defaults are tuned for NSE NIFTY futures on intraday timeframes (1-minute sub-bar delta). For other assets or timeframes, adjust the lower timeframe, normalize window, and band levels — every parameter is exposed.
Originality
This is not a re-skin of a single public indicator. The original contributions are: the detrend-then-standardize normalization that makes CVD divergence valid; three interchangeable flow engines on one shared bounded axis for cross-checking; and a divergence engine with magnitude + distance + extreme-zone gating drawn on the oscillator curve, with in-band reversal detection.
Concept credits
Relative Strength Index — J. Welles Wilder Jr.
Money Flow Index — Gene Quong & Avrum Soudack.
Cumulative Volume Delta and divergence analysis are standard public order-flow / technical-analysis concepts.
This script is an original implementation built around those public concepts and is not affiliated with, nor endorsed by, their originators.
Disclaimer
For research and educational purposes only. Not financial advice and no guarantee of profitability or accuracy. Signed volume is estimated, not exchange-tagged. Indicators describe past price behavior; they do not predict the future. Trading carries risk of loss. Test on out-of-sample data and make your own decisions. The author accepts no liability for any use of this script.
Indicador

Sin RSI Footprint (with Volume, CVD & VWAP)[ALT_analyst]
█ Overview
The Sin RSI Footprint brings the concept of professional order flow and footprint charting directly into momentum oscillators.
Instead of mapping traditional trading volume at raw price levels, this script peers inside the current higher-timeframe candle to map the internal momentum distribution and structural shifts using Lower Timeframe (LTF) RSI Crossovers, Volume, and Cumulative Volume Delta (CVD) data.
By visualizing exactly where and how momentum transitions occurred within a single bar, traders can identify hidden exhaustion, hidden accumulation/distribution, and intra-bar divergences that are completely invisible on standard candlestick charts.
█ Why is this one unique
This is not a normal RSI indicator. It is an intra-bar market structure mapping engine.
Most indicators treat every price level within a single candlestick as equal. This script uses a Fast/Slow RSI Cross Trigger mechanism to filter out ambient market noise, isolating the exact coordinates where momentum definitively shifts. It transforms these structural shifts into a multi-dimensional footprint matrix, combining them with localized transaction metrics.
⚪ What it does
At a high level:
• Retrieves LTF Crossover Data: Uses request.security_lower_tf to fetch an array of LTF Fast/Slow RSI crosses, Close prices, Volume, and CVD for the duration of the current chart's bar.
• Bins the data: Groups the validated LTF momentum nodes into precise price levels or vertical stacks.
• Calculates localized momentum: Identifies exactly where the definitive momentum shifts occurred inside the wick or body.
• Applies VWAP Trend Discipline: Dynamically filters out counter-trend noise based on a multi-band session VWAP.
█ Core Engines & How It Works
⚪ 1. The Matrix Engine (Traditional Price Level)
This mode acts like a traditional volume profile or footprint chart, but optimized for RSI crossover nodes and localized liquidity.
The script divides the high-to-low range of the current candle into user-defined bins (e.g., 10 rows). It calculates the step size dynamically:
float _st = _bh > _bl ? (_bh - _bl) / _i21 : syminfo.mintick
For each LTF crossover point, it determines the correct row and calculates the localized average RSI, accumulated Volume, and CVD.
Why this matters: It maps definitive momentum shifts to specific price levels. You can instantly see if buyers were exhausting their momentum at the absolute highs or absorbing pressure in the middle of the candle.
⚪ 2. The Stack Engine (Vertical Momentum)
This mode stacks validated LTF RSI crossover prints vertically above or below the candle based on a baseline threshold.
If the triggered LTF RSI is > 50, it is categorized as bullish and stacked above the candle's high. If <= 50, it is stacked below the candle's low. The height of each box is calculated dynamically using the Average True Range (ATR):
float _bhg = _ba * _i22
Why this matters: Separating crossover prints above and below the candle isolates bullish vs. bearish momentum bursts. Using ATR for box height ensures the boxes remain visually proportionate across different assets and timeframes regardless of absolute price volatility.
⚪ 3. The Adaptive VWAP Filter Engine & Multi-Bands
To enforce strict trading discipline ("No position is the third position"), the script includes an adaptive VWAP transparency filter and a dynamic multi-band system.
If a localized footprint box generates a "Sell" signal (overbought RSI) but the price level is ABOVE the session VWAP (bullish regime), the script automatically increases the transparency of that box, fading it into the background. It does the same for "Buy" signals below VWAP.
This ensures you are only presented with high-probability exhaustion or continuation signals that align with the true intraday value.
█ Key Features
• Micro Momentum Analysis: Displays localized RSI, Volume (K), and CVD directly inside the footprint boxes only when a momentum shift is confirmed.
• VWAP Trend Gate & Gradient Bands: Counter-trend signals are visually faded to prevent fighting the primary trend, visualized alongside 3 dynamic standard deviation bands.
• Noise Filter (Hide Range): Clean up the chart by hiding neutral RSI values (e.g., hiding everything between 30 and 70).
• Responsive Text Scaling: Box text size automatically adapts based on box height and user-defined scaling adjustments.
• Custom Color Themes: Choose from heavily optimized palettes including Neon Cyber, Monochrome Dark, Oceanic Deep, Toxic Alert, and Classic TV.
█ Settings
• Mode: Select the rendering engine (Stack or Matrix).
• Fast/Slow RSI Length (Cross Trigger): Defines the sensitivity of the LTF momentum shift detection.
• Matrix Rows: Specifies how many segments the candle is divided into.
• Lower Timeframe (LTF): Specifies the lower timeframe for data collection. Shorter LTFs provide higher precision but increase historical loading requirements.
• Counter-Trend Signal Transparency Filter: Toggles the adaptive VWAP filter.
• Hide Range Min / Max: Filters out neutral momentum values to isolate true extreme nodes.
█ How to Use
⚪ Spotting Reversals (Matrix Mode)
Look for deep red (overbought) RSI footprints concentrated at the very top of a bullish candle's wick. If the next candle fails to break that high, combined with a negative CVD print in the box, it highly suggests momentum exhaustion and trapped buyers at resistance.
⚪ Confirming Breakouts (Stack Mode)
When price breaks a key level, look at the Stack Mode. A large stack of green/blue boxes above the candle, supported by high relative volume, confirms sustained LTF bullish momentum shifting in your favor.
⚪ Filtering Noise
Set the "Hide Range" to 30-70 and enable the "VWAP Filter". The indicator will now only display footprint boxes when the LTF momentum shift reaches true extremes in the direction of the daily trend.
█ Developer's Note & Timeframe Guidelines
As a fundamental characteristic of market structure, momentum patterns observed on higher timeframes tend to carry greater reliability due to the natural reduction of market noise. To achieve optimal performance and prevent technical limitations (TradingView limits), follow these recommended timeframe ratios:
• For Stack Mode (Recommended Ratio: 1:5 to 1:12)
Best paired as 1m LTF on 5m/10m chart, or 5m LTF on 30m/1H chart.
• For Matrix Mode (Recommended Ratio: 1:12 to 1:60)
Best paired as 1m LTF on 15m/1H chart.
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information. All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make.
Indicador

Footprint X-Ray [BOSWaves]Footprint X-Ray - Intrabar Delta Decomposition with Stacked Imbalance, Absorption, and Unfinished Business Detection
Overview
Footprint X-Ray is an intrabar order flow decomposition system that reconstructs the buy and sell volume distribution within each bar by pulling lower timeframe data and mapping participation to price rows, where row coloring, POC identification, stacked imbalance detection, and signal generation are driven by actual delta ratios at each price level rather than bar-level approximations or close-position estimates.
Instead of treating each bar as a single undifferentiated unit of buying or selling pressure, the indicator divides each bar's price range into rows sized relative to ATR, assigns lower timeframe bar volume to each row based on price overlap, and derives a per-row delta ratio that reflects whether buying or selling dominated at each specific price level within the bar. This creates a full participation map inside every candle showing not just what direction the bar moved but where within the bar each side was in control.
This creates an order flow framework that reveals the internal structure of price action invisible on a standard candlestick chart. The footprint cells expose per-level delta composition, the POC identifies the price row with the greatest participation, stacked imbalances highlight consecutive rows with dominant one-sided flow indicating aggressive institutional activity, absorption signals detect when extreme rows show opposing flow against the bar direction, and unfinished business zones project forward from bars where one side was entirely absent at the extreme, marking locations where price is statistically likely to return to complete the auction.
Price is therefore evaluated not at the bar level but at the price row level, exposing order flow dynamics that standard indicators cannot access.
Conceptual Framework
Footprint X-Ray is founded on the principle that the most actionable order flow information lives inside individual bars rather than across them, and that understanding which specific price levels within a bar attracted aggressive buying or selling reveals institutional positioning fingerprints that bar-level indicators systematically obscure.
Standard order flow approaches measure directional commitment at the bar level through delta, volume, or close positioning, but these metrics collapse the internal price distribution into a single reading that loses the structural detail of where within the bar each side dominated. This framework recovers that internal structure by reconstructing per-row participation from lower timeframe data, exposing the distribution of buying and selling pressure across the full price range of every bar.
Three core principles guide the design:
Each price row within a bar should have its own buy and sell volume measurement derived from lower timeframe participation overlap, providing per-level delta ratios rather than bar-level approximations.
Structural patterns within the footprint, specifically stacked consecutive dominant rows and opposing flow at extremes, carry meaningful institutional activity signals that justify dedicated detection and visualization separate from raw row coloring.
Unfinished auction levels where one side was entirely absent at a bar extreme should be projected forward as active reference zones until price returns to complete the participation, as incomplete auctions represent the highest-probability reversion targets within the footprint framework.
This shifts order flow analysis from bar-level delta measurement into per-row intrabar participation mapping where structural footprint patterns expose institutional activity with precision unavailable at the candlestick level.
Theoretical Foundation
The indicator combines lower timeframe OHLCV data retrieval, price overlap-weighted volume allocation to ATR-derived price rows, per-row delta ratio calculation, POC identification by maximum row volume, consecutive dominance run detection for stacked imbalances, extreme row opposing flow detection for absorption, and one-sided extreme row detection for unfinished business zone projection.
Lower timeframe bars are retrieved using security_lower_tf and each lower timeframe bar's volume is allocated to price rows proportionally based on the overlap between the lower timeframe bar's range and each row's boundaries. Bullish lower timeframe bars contribute their allocated volume to buy volume and bearish bars to sell volume, with doji bars split equally. CVD from TradingView's volume delta library provides the bar-level delta for divergence and exhaustion detection. Row size is automatically derived as a fraction of the 200-bar ATR, scaling the footprint granularity to the instrument's typical volatility.
Four internal systems operate in tandem:
Row Construction and Delta Allocation Engine : Divides each bar's price range into ATR-scaled rows, iterates through all lower timeframe bars within the current chart bar, allocates volume to overlapping rows by price range fraction, and derives per-row buy volume, sell volume, total volume, and delta ratio.
Footprint Analysis System : Identifies the POC as the row with maximum total volume, runs consecutive dominance detection in both bull and bear directions to classify stacked imbalance rows, and evaluates extreme rows for absorption by testing opposing side dominance against the configured threshold.
Unfinished Business Zone Engine : Tests the top and bottom rows of each bar for single-sided extreme dominance, creates forward-projecting zone boxes from qualifying rows, extends those zones rightward on each subsequent bar, and removes them when price midpoint is revisited.
Signal Detection System : Derives bar delta from the CVD series, tests for delta divergence against recent price highs and lows, and identifies exhaustion bars where volume significantly exceeds the SMA baseline but net delta remains near zero, indicating a contested bar where neither side achieved directional resolution.
This design provides a complete intrabar participation map with structural pattern detection across every dimension of order flow that is reconstructable from OHLCV data.
How It Works
Footprint X-Ray evaluates price through a sequence of intrabar decomposition and pattern detection processes:
Lower Timeframe Selection : The indicator automatically selects the most appropriate lower timeframe based on the current chart timeframe, using one-second for seconds charts, one-minute for intraday, five-minute for daily, and sixty-minute for higher timeframes, or the manually configured timeframe when auto selection is disabled.
Row Size Calculation : The ATR over 200 bars multiplied by 0.1 and rounded to the minimum tick produces the row height, scaled automatically to the instrument's volatility. Manual row sizing overrides this when auto sizing is disabled.
Lower Timeframe Data Retrieval : OHLCV arrays for the lower timeframe are retrieved via security_lower_tf and CVD is calculated using TradingView's volume delta library, providing both intrabar participation data and bar-level delta for signal detection.
Row Initialization : The bar's price range is divided into rows of equal height, with the number of rows derived from the range divided by the row size.
Volume Allocation per Row : For each row, all lower timeframe bars are iterated. Each lower timeframe bar contributing to a row has its volume allocated proportionally based on the fraction of its range overlapping the row boundary. Bullish lower timeframe bars contribute to buy volume and bearish bars to sell volume.
Delta Ratio Calculation : Each row's delta ratio is calculated as buy volume minus sell volume divided by total volume, producing a normalized score from negative one to positive one that drives cell coloring.
POC Identification : The row with the maximum total volume is identified as the Point of Control, receiving a distinct highlight color and an optional midpoint line.
Stacked Imbalance Detection : Consecutive bullish dominant rows exceeding the configured threshold ratio are identified as bullish stacked imbalances. The same logic in reverse identifies bearish stacks. Qualifying rows receive highlighted border coloring.
Absorption Detection : The top rows of green bars are tested for sell dominance and the bottom rows of red bars are tested for buy dominance. When opposing flow exceeds the absorption threshold at an extreme, an absorption signal is generated at the bar's high or low.
Unfinished Business Zone Creation : The top row of each bar is tested for buy dominance above the UB threshold and the bottom row for sell dominance above the threshold. Qualifying extreme rows generate forward-projecting zone boxes that extend rightward until price revisits the zone midpoint.
Delta Divergence Detection : Price making a new high within the lookback window while bar delta is negative generates a bearish divergence signal. Price making a new low while bar delta is positive generates a bullish divergence signal.
Exhaustion Bar Detection : Bars with volume exceeding the SMA baseline multiplied by the volume multiplier and with absolute delta-to-volume ratio below the configured maximum qualify as exhaustion bars, indicating high participation without directional resolution.
Candle Overlay Rendering : An optional transparent candle overlay with wicks colored by bar delta direction provides directional context on top of the footprint cell display without obscuring the underlying participation data.
Together, these elements form a continuously updating intrabar participation map where cell coloring reveals per-level delta composition, structural pattern detection identifies institutional activity signatures, and forward-projecting zones maintain active auction completion references.
Interpretation
Footprint X-Ray should be interpreted as an intrabar order flow decomposition system with layered structural pattern detection:
Footprint Cells : Each colored box represents a price row within the bar. Green shading indicates buy-dominant flow at that level, red shading indicates sell-dominant flow, and color intensity reflects the magnitude of the imbalance. Neutral rows with balanced participation appear at intermediate opacity.
Cell Text (Delta %) : The percentage displayed in each cell represents the net delta ratio for that row, quantifying how one-sided participation was at each specific price level within the bar.
Cell Text (Volume) : When volume mode is selected, each cell displays the net volume (buy minus sell) at that price row, providing absolute rather than relative participation data.
Accent Lines : A bright horizontal line on the dominant edge of each row highlights the side with greater participation, providing a clean visual boundary that reinforces the directional reading of each cell without requiring the text to be read.
POC Row : The row with the highest total volume receives a distinct highlight and optional midpoint line, marking the price level with the greatest participation concentration within the bar and the most significant auction reference point.
Stacked Imbalance Borders : Rows identified as part of a consecutive dominant run receive highlighted border coloring in the imbalance direction, signaling aggressive institutional one-sided flow across multiple consecutive price levels within the bar.
Absorption Diamonds : Diamond markers below bars indicate bullish absorption where buyers dominated the bottom rows of a red bar, suggesting selling pressure was being absorbed by aggressive buyers. Diamonds above bars indicate bearish absorption where sellers dominated the top rows of a green bar.
Unfinished Business Zones : Forward-projecting shaded boxes from extreme rows where one side was entirely absent mark incomplete auctions. Bullish UB zones project from bars where buyers dominated the top row without seller response. Bearish UB zones project from bars where sellers dominated the bottom row without buyer response.
Delta Divergence Crosses : Cross markers below price on bullish divergences and above price on bearish divergences identify structural disagreement between price direction and bar delta, flagging hidden weakness at new highs and hidden strength at new lows.
Exhaustion Circles : Orange circles on bars with extreme volume but near-zero net delta mark contested bars where neither side achieved resolution despite heavy participation, indicating potential inflection points where the prior directional move may be losing conviction.
Delta Wicks : Optional candle overlay wicks colored by bar delta direction provide an immediate visual cue for whether net buying or net selling dominated the bar as a whole, complementing the per-row cell analysis.
Per-row delta composition, POC location, stacked imbalance presence, absorption signals, unfinished business zones, and exhaustion bars collectively provide more order flow intelligence than any element in isolation.
Signal Logic & Visual Cues
Footprint X-Ray presents five distinct signal types derived from intrabar participation analysis:
Absorption Signal : Diamond markers generated when extreme rows show opposing flow against the bar direction, identifying institutional absorption of aggressive flow at price extremes.
Delta Divergence Signal : Cross markers generated when price makes new highs or lows within the lookback window but bar delta contradicts the directional move, flagging structurally weak breakouts.
Exhaustion Bar Signal : Orange circles generated on bars with exceptional volume and near-zero net delta, identifying participation battles where neither side achieved dominance despite heavy activity.
Unfinished business zones provide continuous passive signal context by projecting forward from incomplete auction extremes until price returns to complete the participation sequence.
Alert generation covers bullish and bearish CVD flips, bullish and bearish absorption events, bullish and bearish delta divergence, and exhaustion bar detection for comprehensive systematic order flow monitoring.
Strategy Integration
Footprint X-Ray fits within institutional order flow and auction theory-based trading approaches:
POC Reaction Trading : Use POC rows as high-probability reference levels within each bar. The highest-volume row represents the price level most accepted by both buyers and sellers and frequently acts as intrabar support, resistance, or reversion anchor on subsequent price interaction.
Stacked Imbalance Directional Bias : Use stacked imbalance detection as a directional conviction signal within bars. Consecutive buy-dominant rows from low to high indicate sustained aggressive buying across multiple price levels, suggesting institutional accumulation rather than isolated speculative activity.
Absorption Reversal Framing : Use absorption signals as potential reversal triggers where aggressive flow is meeting organized opposing participation at extremes. Bullish absorption at the low of a red bar suggests buyers are defending price levels despite selling pressure, while bearish absorption at the high of a green bar suggests sellers are resisting upside extension.
Unfinished Business Zone Targets : Use UB zones as reversion targets for subsequent price action, monitoring whether price returns to complete the auction at levels where one side was previously absent. The completion of an unfinished auction typically involves a return to the zone followed by the missing side finally participating.
Divergence-Confirmed Entries : Use delta divergence signals as structural warning indicators rather than standalone entries, weighting them more heavily when they coincide with other confluence factors such as absorption or unfinished business zone proximity.
Exhaustion Bar Context : Treat exhaustion bars as inflection point alerts requiring subsequent bar confirmation rather than immediate entry triggers. High volume with near-zero delta indicates a contested equilibrium that will resolve directionally on the following bars.
Technical Implementation Details
Delta Source : TradingView volume delta library providing CVD series with automatic lower timeframe selection
Row Construction : ATR-fraction row sizing with lower timeframe price overlap-weighted volume allocation per row
Analysis Engine : Maximum volume POC identification, consecutive dominance run detection for stacked imbalances, and extreme row opposing flow testing for absorption
UB System : Array-managed forward-projecting zone boxes with midpoint revisit detection and automatic removal
Signal Detection : CVD-based delta divergence against lookback window highs and lows, volume SMA ratio combined with delta ratio for exhaustion classification
Visualization : Gradient-colored footprint cells with accent lines, POC highlighting, stacked imbalance borders, absorption and divergence markers, exhaustion circles, UB zones, and optional delta wick candle overlay
Performance Profile : Optimized with object count caps and array management for real-time execution across intraday and higher timeframes
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Intrabar microstructure analysis for scalping with automatic one-minute lower timeframe providing high-resolution participation data within each chart bar
15 - 60 min : Session-level order flow decomposition for intraday trading with sufficient lower timeframe bar count per chart bar to produce meaningful row distributions
4H - Daily : Swing-level institutional footprint analysis with five-minute lower timeframe providing detailed participation mapping across larger price ranges
Suggested Baseline Configuration:
Auto Lower Timeframe : Enabled
Auto Row Size : Enabled
Cell Text : Delta %
Accent Lines : Enabled
Highlight POC Row : Enabled
Show Stacked Imbalances : Enabled
Min Consecutive Rows : 3
Dominance Threshold (SI) : 0.60
Show Absorption : Enabled
Show Unfinished Business : Enabled
Delta Divergence : Enabled
Exhaustion Bars : Enabled
Show Candle Overlay : Enabled
These suggested parameters should be used as a baseline; their effectiveness depends on the instrument's volume characteristics, typical bar range, and preferred signal sensitivity, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Too few rows per bar : Disable Auto Row Size and manually reduce the row size value to increase row count, producing a more granular footprint with finer price level resolution for the target instrument and timeframe combination.
Too many rows cluttering the display : Increase the manual row size or allow auto sizing to recalibrate. On higher timeframes with large bar ranges the automatic ATR fraction may produce excessive row counts that reduce readability.
Stacked imbalance signals too frequent : Increase the Min Consecutive Rows setting to require longer dominance runs before stacking is classified, or increase the Dominance Threshold toward 0.75 to demand stronger per-row directional conviction.
Absorption signals too frequent : Increase the Absorption Threshold toward 0.80 to require stronger opposing dominance at extremes before an absorption signal fires, filtering for only the most decisive institutional responses.
Too many unfinished business zones : Increase the UB Dominance Threshold toward 0.90 to restrict zone creation to only the most extreme single-sided bar extremes, reducing zone density on the chart.
Divergence signals firing too often : Increase the Divergence Lookback to require price to make a more significant new high or low before the divergence condition tests, reducing signal frequency to only the most structurally significant disagreements.
Exhaustion signals too frequent : Increase the Volume Multiplier to require a larger volume spike above the baseline before exhaustion classification, or decrease the Max Delta Ratio to require closer to zero net delta for a bar to qualify.
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
Liquid instruments with consistent volume where lower timeframe bar allocation produces meaningful per-row participation distributions and reliable delta measurements
Intraday and session-level timeframes where sufficient lower timeframe bars exist within each chart bar to produce statistically representative row-level volume allocation
Order flow-based trading approaches where intrabar participation patterns provide entry confirmation or invalidation context that bar-level indicators cannot supply
Institutional activity monitoring where stacked imbalances and absorption patterns reveal aggressive positioning that precedes significant directional moves
Reduced Effectiveness:
Low-liquidity instruments where thin lower timeframe volume produces sparse row distributions with many empty cells and unreliable per-level delta ratios
Higher timeframes on instruments without lower timeframe data availability where security_lower_tf returns insufficient bars per chart bar for meaningful decomposition
Instruments without volume data, which the indicator detects and blocks with a runtime error
Extremely fast markets during news events where lower timeframe bars are so large relative to the chart bar range that overlap allocation produces distorted row distributions
Thin or extended-hours sessions where volume is too low to produce statistically meaningful per-row participation differences distinguishable from random distribution
Integration Guidelines
Confluence : Combine with BOSWaves structural tools, trend indicators, or momentum oscillators to validate footprint-derived signals with broader analytical context before acting on intrabar participation patterns
POC Context : Treat POC rows as the most significant intrabar reference levels. Subsequent price returning to a prior bar's POC is returning to its highest-participation level, which frequently acts as support, resistance, or magnetic reversion anchor.
Stacked Imbalance Direction : Use stacked imbalance direction as a short-term institutional bias indicator. Consecutive buy-dominant rows from low to high suggest aggressive accumulation that may continue on subsequent bars. Consecutive sell-dominant rows suggest distribution.
Unfinished Business Patience : Allow UB zones to be approached naturally rather than anticipating reactions immediately after formation. The auction completion process can take multiple bars and the zone should be monitored for participation behavior on arrival rather than treated as an automatic reversal level.
Exhaustion Confirmation Requirement : Never treat exhaustion bars as standalone entry triggers. The exhaustion condition identifies a contested state that requires subsequent directional resolution. Wait for the following bar to confirm which side won the participation battle before acting on the exhaustion signal.
Disclaimer
Footprint X-Ray is a professional-grade intrabar order flow decomposition and institutional activity detection tool. It uses lower timeframe volume allocation with per-row delta calculation but does not access true exchange-level bid and ask data. All participation measurements are reconstructed from OHLCV data and represent best-approximation estimates rather than actual order book information. Results depend on instrument liquidity, lower timeframe data availability, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates price structure, trend context, and comprehensive risk management. Indicador

Order Flow Microstructure Engine# Order Flow Microstructure Engine
**Order Flow Microstructure Engine** condenses a full stack of order-flow and market-microstructure measures into a single decision: one confidence %, one tier, and one action with entry/stop levels — shown in an adaptive on-chart dashboard. It is built to answer one question on every bar: *are aggressive buyers or aggressive sellers in control, and how convinced should you be?*
This is not a bundle of unrelated indicators placed on one chart. Every component measures a **different facet of the same process** — the buy/sell auction happening inside each bar — and they are combined inside **one probabilistic model**. The reason for the mashup, and how the parts interact, is described below as the guidelines require.
**Why these components are combined (mashup justification)**
No single order-flow measure is reliable alone: raw delta misleads during absorption, CVD drifts, footprint imbalances appear in chop, and toxicity rises at both reversals and breakouts. Because these weaknesses are *partially independent*, fusing the measures correctly cancels noise that any one of them carries. The original element is **how** the fusion is done — not what is plotted.
**How it works (the pipeline)**
1. *Reconstruction.* Lower-timeframe sub-bars are pulled and each is classified buy/sell with a tick-rule cascade (after Lee & Ready). Where the data plan exposes native volume footprint, real bid/ask is used and aggregated into the same price bins. The dashboard always shows whether it is running on reconstructed (`RECON`) or native (`NATIVE`) data.
2. *Factors.* From that base it derives Aggressor Imbalance Ratio, Cumulative Volume Delta, footprint imbalances/POC, auction Value-Area efficiency (acceptance vs rejection), integrated multi-level Order-Flow Imbalance (depth-weighted), VPIN-style flow toxicity, Kyle's lambda price-impact/liquidity, a directional self-exciting (Hawkes) intensity, and a square-root-law absorption measure.
3. *Fusion (the original part).* Each factor is mapped to a probability and combined in Bayesian log-odds. Crucially, the flow-derived factors are **decorrelated before fusion** using an effective-sample-size (design-effect) shrinkage, so factors that are really the *same evidence* (AIR, delta, CVD, footprint, OFI) cannot inflate confidence just by agreeing. Structurally independent factors (auction efficiency, MOC, Hawkes, absorption, cross-instrument) enter at full weight. The posterior is then gated by multi-timeframe and multi-horizon consensus and damped by a regime-thrash (chop) penalty, producing one confidence → a 5-tier ladder → an action.
Without this combination you would get several conflicting opinions; the value is the **correlation-aware fusion** that turns them into one calibrated read.
**How to use it**
- Apply to a liquid instrument on an intraday timeframe (1m–1h). Defaults are tuned for index futures on 5-minute charts with 5-second sub-bars.
- Read the Compact dashboard top-down: ACTION + confidence %, Tier (position-size guidance), Entry/Stop, then CO-FIRE confluence, multi-timeframe and regime/stability. Switch "Table view mode" to Full for a complete factor-by-factor breakdown.
- On-chart triangles mark Tier-1/Tier-2 long/short signals across history; footprint boxes show the intrabar buy/sell distribution.
- For other markets: change the **Market preset** (group 01). Choose **CUSTOM** to set your own session, MOC window, footprint bin sizing and CVD reset — making it usable on any instrument in any market.
- The dashboard theme auto-adapts to a light or dark chart background.
**What makes it original**
Correlation-aware decorrelated Bayesian fusion of order-flow factors; a native-footprint seam that uses real bid/ask when available and transparently falls back to reconstruction; layered multi-horizon + multi-timeframe + cross-instrument confirmation on a microstructure base; and a regime-stability filter that penalizes only genuine directional reversals, not same-direction intensity changes.
**Honesty / limitations**
On most retail feeds, order flow here is reconstructed from lower-timeframe data via the tick rule (~75–80% trade-sign accuracy), not true exchange bid/ask, unless your plan provides native footprint data. The data source is shown in the dashboard. This is an analytic and educational tool, not financial advice and not a guarantee of results.
**Concept credits**
Lee & Ready (trade sign); Kyle (price impact / lambda); Easley, López de Prado & O'Hara (VPIN); Cont, Kukanov & Stoikov and Xu, Gould & Howison (OFI / multi-level OFI); Hawkes and Bacry–Muzy (self-exciting intensity); Almgren and Tóth–Bouchaud (square-root impact law); Kaufman (Efficiency-Ratio adaptation); Steidlmayer (Market Profile / Value Area); Kish (design effect). All Pine implementations are original re-derivations; no external script code is used.
**Disclaimer**
For research and educational purposes only. Nothing here is financial advice. Markets carry risk and past behaviour does not guarantee future results. Always do your own research and manage risk.
Indicador

Delta by Price (Delta Volume Profile)🔹 Introduction
This indicator, Delta by Price (Delta Volume Profile), takes the familiar concept of a volume profile and replaces raw traded volume with net directional volume (delta) at each price level. Instead of showing how much volume traded at a price, it shows which side was more aggressive at that price — buyers or sellers.
The idea is straightforward: if a price level absorbed significantly more aggressive buying than selling (or vice versa), that level likely represents a meaningful shift in who was in control of the auction at that point in the range.
One thing to be upfront about: true tick-by-tick delta isn't available to Pine scripts. This indicator approximates delta by pulling lower-timeframe bars within each higher-timeframe bar and classifying each LTF bar's volume as buy-side or sell-side based on whether it closed above or below its open. It's a proxy, not a recording of the actual order book — but it's the same proxy nearly all publicly available delta tools use, and it tends to track real aggressor flow reasonably well over meaningful sample sizes.
🔹 The Premise / Background Theory
🔸 Volume tells you "how much," delta tells you "who pushed"
A standard volume profile answers one question: how much volume traded at each price? It's useful for finding high-volume nodes (areas of acceptance) and low-volume nodes (areas of rejection), but it's directionally blind. A price level with 1,000 contracts could be 500 aggressive buys and 500 aggressive sells — pure equilibrium — or it could be 950 buys and 50 sells, meaning that level was overwhelmingly bought into.
Delta separates these two scenarios. A delta profile takes that same volume and splits it by aggressor side, then nets it. The result is a histogram that shows not just where volume concentrated, but which direction the pressure leaned at every price.
🔸 A concrete example
Assume price moves through a range from 5,000 to 5,010 over a session.
At the 5,002 level, three separate visits occur. On the first visit, an LTF bar closes higher than it opened with volume of 200 — classified as buy-side. On the second visit, another bar closes lower than it opened with volume of 150 — sell-side. On the third visit, a bar closes higher with volume of 300 — buy-side.
Net delta at 5,002 = +200 − 150 + 300 = +350.
Total volume at 5,002 = 200 + 150 + 300 = 650.
A standard volume profile would just show "650 contracts traded here." The delta profile shows +350 net buying — meaning roughly 54% more buy-side aggression than sell-side at that exact price. If you saw a level like this near the low of a range, it might suggest buyers stepped in there with conviction, not just that "a lot happened" there.
🔸 Why distribute delta across a bar's range instead of just its close
Each higher-timeframe bar has a high and a low, and the LTF bars that compose it trade across that entire range — not just at the close. This indicator takes each HTF bar's net delta and spreads it proportionally across every price bin the bar's high-to-low range touches.
This is an assumption, not a measurement. In reality, delta within a single bar isn't evenly distributed across its range — more of it likely occurred near where price spent the most time. But without LTF-by-LTF price-level tracking (which would be computationally heavy and hit Pine's lower-timeframe data limits quickly), even distribution across the bar's range is the most defensible simplification available. Wider bars contribute a thinner "smear" of delta per price bin; narrow bars concentrate their delta into fewer bins. Over a large enough sample, this tends to average out reasonably well.
🔹 How It Works
🔸 Profile Range: Session vs. Rolling Lookback
The indicator builds its profile from one of two data windows, selectable in settings.
Session mode mirrors how a session volume profile works — it resets at the start of each new session (defined by the session time input) and accumulates only the bars within that session. This is the natural choice if you want to see, for example, today's regular trading hours delta distribution reset cleanly each day, the same way you'd look at a daily session volume profile.
Rolling Lookback mode instead uses a fixed number of the most recent closed bars (configurable, default 200), regardless of session boundaries. This is useful for a continuously updating view of recent delta structure that isn't tied to calendar sessions — helpful for instruments or sessions that don't fit a clean daily reset (e.g. 24-hour futures markets).
There are limitations here worth noting. Session mode depends on the session time input matching how you actually think about your trading day. If you trade through multiple sessions (e.g. Asian, London, NY) and only select one as your "session," the profile will reset and rebuild only around that window — bars outside it are ignored entirely.
🔸 Number of Price Rows
This setting controls how finely the price range is divided into bins — effectively the "resolution" of the profile. A higher row count gives more granular price-level detail but spreads the available delta across more bins, making each individual bin's bar shorter and potentially noisier. A lower row count aggregates more price action into each bin, producing a smoother, more visually digestible profile but losing some precision about exactly where within a price cluster the delta concentrated.
This is a resolution-versus-noise tradeoff — there's no universally correct setting, and it's worth adjusting based on the instrument's typical range and tick size.
🔸 Extend Direction
The profile can be drawn extending to the right of the current bar (the default, useful when you want the profile visible without obscuring recent price action to the left) or to the left, anchored at the start of the lookback/session window — placing it where the data actually begins, similar to how some volume profile tools anchor to the left edge of the range being measured.
This is purely a visual/layout preference and doesn't change any underlying calculation — it only affects where the horizontal delta bars are drawn relative to price.
🔸 Point of Control (POC)
When enabled, a label marks the price bin with the highest total absolute volume (buy-side + sell-side combined, not net delta) — analogous to the POC on a standard volume profile. This identifies where the most total activity occurred, regardless of which direction it leaned. It's possible — and informative — for the POC bin to have a relatively small net delta despite high total volume, which would indicate that level saw heavy two-sided participation rather than one-sided conviction.
🔸 Custom Lower Timeframe
By default, the indicator automatically selects a lower timeframe for delta calculation based on your chart's timeframe (1-second charts use 1S, intraday charts use 1-minute, daily charts use 5-minute, and anything larger uses 60-minute). You can override this manually.
The tradeoff here is precision versus data availability. A finer LTF gives a more granular delta classification per HTF bar, but request.security_lower_tf() has practical limits on how many LTF bars it can return per HTF bar — on very large lookbacks with a very fine LTF relative to your chart timeframe, you may not get the full intrabar picture for older bars.
🔹 Closing Remarks
A delta-by-price profile doesn't tell you why buyers or sellers were more aggressive at a given level — only that they were, based on a reasonable proxy for aggressor classification. Large net-delta clusters don't guarantee future support or resistance. They're best treated as a layer of context: a way of seeing whether the volume that built a price level was directionally lopsided or balanced, which can complement (not replace) your read of structure, location, and broader order flow.
Used alongside the rest of your framework, it's another lens for asking the same underlying question every footprint-based approach asks: was this level built by conviction, or by indecision? Indicador

Session CVD DivergenceSession CVD Divergence splits Cumulative Volume Delta into three independent session streams (Asian, London, and New York) and automatically detects all four divergence types between price and order flow.
TWO-SCRIPT SETUP
This indicator comes as a pair:
Session CVD Divergence (this script) — add to a new pane. Shows the CVD lines for each session and draws divergence lines between the CVD pivots.
Session CVD — Chart Labels — add as an overlay. Draws the same divergence lines between the price pivots on the main chart, with labels at each signal.
Both scripts must be on the chart together for the full picture. Settings (session times, pivot length, colors) are identical between the two, keep them in sync.
Session CVD Chart Labels:
WHY SESSION-SCOPED CVD?
A standard CVD indicator runs continuously across the entire day. That means London's aggressive buying gets buried inside Asia's quiet accumulation, and by the time New York opens you're reading a blended signal with no session context.
This indicator resets CVD to zero at the open of each session. What you see is the net order flow within that session only, independent of what happened before.
THE FOUR DIVERGENCE TYPES
Regular divergences (reversal signals, solid lines)
BD — Bullish Divergence: price makes a lower low, CVD makes a higher low. Selling pressure is drying up.
BrD — Bearish Divergence: price makes a higher high, CVD makes a lower high. Buying pressure is fading.
Hidden divergences (continuation signals, dashed lines)
hBD — Hidden Bullish Divergence: price makes a higher low, CVD makes a lower low. Uptrend remains intact beneath the surface.
hBrD — Hidden Bearish Divergence: price makes a lower high, CVD makes a higher high. Downtrend continuation despite apparent strength.
Each signal draws a line directly between the two pivots that form the divergence: on the CVD pane between the CVD pivot values, and on the main chart between the price pivot values. Solid lines for reversals, dashed lines for continuations.
SAME-SESSION CONSTRAINT
Divergence is only detected between two pivots that belong to the same session. A CVD pivot from the Asian session and a pivot from the London session are never compared, as their CVD scales are incompatible since each resets independently. This eliminates a significant source of false signals present in most divergence tools.
DELTA APPROXIMATION
Each bar's volume delta is estimated using the close-position formula:
delta = V x ( 2 x (C - L) / (H - L) - 1 )
A bar closing at its high contributes its full volume as buying. A bar closing at its low contributes its full volume as selling. Everything between is proportional.
SETTINGS
Session Boundaries — all session open/close times are configurable in UTC hours. Defaults: Asian 00 to 08, London 08 to 16, NY 13 to 21.
Pivot Detection Bars — controls sensitivity. Lower = more signals. Higher = only major pivots confirmed by more bars on each side.
Regular / Hidden divergence — each type can be toggled independently.
Colors — all four divergence types and all three session lines are individually customizable.
Session background — subtle shading shows which session each bar belongs to.
RECOMMENDED TIMEFRAME
15m to 4H. A warning label appears if the indicator is applied to a daily or higher timeframe.
Indicador

Indicador

Viprasol Naive Bayes Order FlowOverview
This indicator is based on "Institutional Order Flow Signals " by PMT, an open-source script that classifies order-flow conditions with a Naive Bayes classifier trained on Cumulative Volume Delta (CVD) features. The original produces a posterior probability that the current bar belongs to a Bull, Bear, or Diverged regime, then prints directional signals when that probability clears a threshold and price agrees with a trend EMA. This version keeps that classifier intact and layers a Viprasol signal-filter stack on top: a signal cooldown, an optional volume-surge confluence requirement, a bar-close confirmation gate, live classifier hit-rate tracking, and regime-flip detection.
It is built for traders who want a probabilistic read on whether buying or selling pressure (measured through volume delta) is currently dominating, with explicit noise controls applied before any signal fires.
How It Works
Cumulative Volume Delta (from original):
Each bar's volume is split into buying and selling pressure by where the close sits inside the bar's range. Buy volume = volume × (close − low) / range; sell volume = volume × (high − close) / range. The bar delta is buy minus sell, and these deltas are summed into a running CVD line. CVD rising means net buying pressure is accumulating; falling means net selling.
Three Classifier Features (from original):
The classifier is trained on three z-score-normalised features so they are comparable across instruments:
- F1 — CVD rate of change over the momentum period, normalised against its own rolling mean and standard deviation.
- F2 — price/flow divergence: price ROC minus CVD ROC, normalised. Large values flag price moving without matching flow (or vice versa).
- F3 — CVD slope: the first difference of a linear regression on the CVD line, normalised. Captures the acceleration of flow.
Naive Bayes Classification (from original):
Every bar is labelled into one of three classes from the prior bar's outcome — Bull (price up and CVD up), Bear (price down and CVD down), or Diverged (anything else). For each class the script maintains running sums of each feature and each feature squared, from which it derives a per-class mean and standard deviation online (no arrays of history needed). The likelihood of the current feature vector under each class is the product of three Gaussian PDFs (the "naive" independence assumption). Combined with class priors (the observed class frequencies), Bayes' rule yields the posterior probability of each class:
posterior(class) = prior(class) × likelihood(class) / evidence
A signal requires the posterior to clear the entry threshold, price to be on the correct side of the trend EMA, and CVD to be moving in the signal's direction. Signals fire only on the first bar of a new cluster to avoid consecutive repeats.
Signal Cooldown (new):
After any signal fires, a configurable number of bars must elapse before the next signal of any direction is allowed, tracked as bar_index − lastSignalBar >= cooldown. During fast moves the classifier can re-cross the threshold repeatedly; the cooldown collapses those into one actionable signal. A cooldown of 5 bars on a 15-minute chart enforces a 75-minute minimum gap between entries.
Volume-Surge Confluence (new):
When enabled, a signal is additionally gated on current volume exceeding its rolling average by a multiplier (default 1.5×). The logic is volume > sma(volume, length) × multiplier. This filters out classifier signals that occur on thin participation, where flow estimates are least reliable.
Bar-Close Confirmation (new):
When enabled, signals are only confirmed on a fully closed bar (barstate.isconfirmed). Because the posterior and CVD update intrabar, a developing bar can flip in and out of a signal state before it closes; this gate holds the signal until the bar settles.
Classifier Hit-Rate Tracking (new):
On every live bar the script takes the argmax of the three posteriors as its prediction, then on the following bar compares that prediction to the realised class label. It accumulates a running hit count and evaluation count and displays the ratio as a live "Hit Rate" in the dashboard. This is an honest in-sample diagnostic of how often the classifier's single most-likely class matched the next realised label — not a trade win rate.
Regime-Flip Detection (new):
The script tracks the active regime (+1 bull, −1 bear, 0 neutral) and fires a dedicated alert whenever it transitions into a new bull or bear regime, independent of the entry-cluster logic. Useful for traders who want to be notified of context shifts rather than individual entries.
Diverged Class Surfaced (new):
The original computes a third "Diverged" class but never displays its posterior. This version surfaces P(Diverged) in the dashboard so the trader can see when the classifier considers the tape conflicted (price and flow disagreeing) rather than directional.
What Is Original (Viprasol Additions)
1. Signal cooldown system — enforces a minimum bar gap between signals to prevent clustering during fast moves.
2. Volume-surge confluence filter — optionally requires above-average volume on the signal bar so signals occur on real participation.
3. Bar-close confirmation gate — optionally holds signals until the bar closes, removing intrabar flip-flop.
4. Classifier hit-rate tracking — online comparison of the argmax-posterior prediction to the next realised class, displayed live.
5. Regime-flip detection — separate state machine and alert for bull/bear regime transitions.
6. Diverged-class posterior surfaced in the dashboard, exposing the third class the original computed but hid.
Key Features
From the Original (PMT):
- CVD line built from close-position volume splitting
- Three z-score-normalised classifier features (CVD ROC, price/flow divergence, CVD slope)
- Online Naive Bayes classifier over Bull / Bear / Diverged classes with Gaussian likelihoods
- Posterior-probability entry threshold with trend-EMA and CVD-direction agreement
- Confidence tiers (high / mid / normal) driving signal shape and band opacity
- Confidence-scaled posterior band and regime background shading
- ATR-based SL/TP projection lines
- Warmup gate (LIVE only after the classifier has trained on enough bars)
- Zen mode for clean screenshots
Added in This Version (Viprasol):
- Signal cooldown, volume-surge confluence, and bar-close confirmation filters
- Live classifier hit-rate diagnostic
- Regime-flip detection and alert
- Diverged-class posterior in the dashboard
- Colored TP / ENTRY / SL price labels on the projection lines
- Expanded info dashboard with selectable position
- Six alert conditions with dynamic {{ticker}} / {{close}} / {{interval}} messages
How to Use
Getting Started:
1. Add to a standard candlestick chart (not Heikin Ashi).
2. Wait for the dashboard to read LIVE — the classifier needs to train on enough bars first (status shows WARMUP and an N-trained counter until then).
3. Long signals print below the bar (circle = high conviction, triangle = normal); short signals print above the bar.
Reading the Dashboard:
- Bull P / Bear P / Diverged P — the three class posteriors. The dominant one drives the regime.
- CVD Flow — whether net delta is currently rising (buy) or falling (sell).
- Vol Surge — whether the current bar cleared the volume-surge threshold.
- Hit Rate — share of bars where the most-likely class matched the next realised class.
- N Trained — how many bars the classifier has trained on; ✓ once warmed up.
Recommended Starting Points:
- Crypto/Forex (5m-15m): Lookback 100, Threshold 0.70, Cooldown 3
- Stocks (15m-1H): Lookback 120, Threshold 0.72, Cooldown 5
- Indices (1H-4H): Lookback 150, Threshold 0.75, Cooldown 8
These are starting points only. Volume data quality and tape behaviour differ by instrument — backtest and adjust before trading live.
Settings
Naive Bayes Classifier: classifier lookback (bars before signals go live), entry threshold (minimum posterior), and prior bull probability.
CVD Features: CVD momentum period, CVD slope period, and the z-score normalisation window applied to all features.
Signal Filters (Viprasol): signal cooldown in bars, bar-close confirmation toggle, volume-surge requirement with average length and multiplier.
Signal Levels: show SL/TP lines, show price labels, SL ATR multiplier, risk:reward ratio, ATR period, and trend EMA period.
Visual: posterior band toggle, regime background toggle, and bull / bear / diverged colors.
Dashboard / Display: Zen mode, dashboard toggle, and dashboard position.
Alerts
1. Long Signal — bull posterior cleared the threshold with CVD rising and all filters passed
2. Short Signal — bear posterior cleared the threshold with CVD falling and all filters passed
3. Any Signal — either direction fired
4. High-Conviction Long — long signal with P(Bull) at or above 85%
5. High-Conviction Short — short signal with P(Bear) at or above 85%
6. Regime Flip — the active regime transitioned into a new bull or bear state
All alerts include {{ticker}}, {{close}}, and {{interval}} for dynamic notification messages.
Limitations & Disclaimer
- The classifier trains in-sample on the chart's own history and updates continuously; the displayed hit rate is a diagnostic of class-label agreement, not a trade win rate, and is not predictive of future results.
- CVD here is approximated from candle range and volume, not from true bid/ask tick data. Volume quality varies by broker and instrument, so the same symbol on different feeds can produce different signals.
- The classifier needs a warmup period before signals appear; on fresh charts or low-history symbols it may stay in WARMUP for a long time.
- Posteriors and CVD update intrabar; without bar-close confirmation enabled, signals can appear and disappear before a bar closes.
- SL/TP lines and price labels are visual references only — they do not place or manage trades.
- Filters reduce noise but also reduce signal count; in fast trends the cooldown may delay otherwise valid entries.
- Past performance does not guarantee future results. This indicator is for educational and analytical purposes only and is not financial advice. Always use proper risk management and test on historical data before trading live.
Credits & Attribution
Based on "Institutional Order Flow Signals " by PMT, which provided the CVD construction, the three z-score-normalised classifier features (CVD ROC, price/flow divergence, CVD slope), the online Naive Bayes classifier over Bull/Bear/Diverged classes with Gaussian likelihoods, the posterior-threshold entry logic with trend-EMA and CVD agreement, the confidence tiers, the posterior band and regime background, and the ATR-based SL/TP projection lines. Added by Viprasol: signal cooldown, volume-surge confluence filter, bar-close confirmation gate, live classifier hit-rate tracking, regime-flip detection and alert, the surfaced Diverged-class posterior, TP/ENTRY/SL price labels, an expanded dashboard, and a six-condition dynamic alert set.
Published open-source per TradingView House Rules.
Indicador

CVD X-Ray
CVD X-Ray
See the Participation Behind the Move
Most indicators tell you what price is doing.
CVD X-Ray is designed to reveal who is participating behind the move.
Price can rally on weak participation.
Price can decline despite aggressive buying.
Price can appear strong while participation quietly deteriorates beneath the surface.
CVD X-Ray was built to expose these hidden shifts in market participation by combining cumulative volume delta pressure, momentum acceleration, participation normalization, and multi-timeframe alignment into a single visual framework.
Rather than focusing solely on market structure, CVD X-Ray focuses on participation pressure—the intensity and direction of buying and selling activity driving the current move.
What Makes CVD X-Ray Different?
Traditional volume indicators often struggle with context.
A large reading may appear important on one chart while being completely normal on another.
CVD X-Ray solves this by normalizing participation pressure and classifying it into intuitive strength categories:
Weak
Building
Moderate
Strong
Extreme
This allows traders to quickly distinguish between routine activity and meaningful participation events.
Pressure vs Trend
One of the most common mistakes traders make is confusing participation with trend.
A market can be trending lower while buyers suddenly begin participating aggressively.
Likewise, a market can be trending higher while participation quietly weakens beneath the surface.
CVD X-Ray intentionally measures participation pressure rather than market structure trend.
This distinction can help identify potential continuation opportunities, weakening moves, failed breakouts, and early signs of accumulation or distribution.
Strength and Rarity
Each reading is evaluated based on both participation strength and historical context.
The optional percentile ranking (PCT) provides additional insight into how unusual the current participation reading is relative to recent market behavior.
For example:
P80 = Stronger than 80% of recent readings
P95 = Stronger than 95% of recent readings
This helps traders quickly recognize when participation is becoming statistically significant.
Designed for Clarity
CVD X-Ray was built around a simple goal:
Reduce information overload while increasing informational value.
The interface uses a consistent strength scale, visual participation hierarchy, and clean multi-timeframe dashboard to deliver actionable context without cluttering the chart.
Whether you're analyzing breakouts, pullbacks, reversals, or trend continuation setups, CVD X-Ray provides a structured view of the participation driving price.
Because understanding what price is doing is useful.
Understanding who is participating behind the move is often more valuable.
Disclaimer
CVD X-Ray is an analytical tool designed to assist in evaluating market participation and participation pressure. It does not predict future price movements and should not be used as a standalone basis for trading decisions.
All trading involves risk, including the potential loss of capital. Past performance, historical participation readings, and indicator signals are not guarantees of future results.
This script is provided for educational and informational purposes only and does not constitute financial, investment, or trading advice. Users are solely responsible for their own risk management and trading decisions. Indicador

MTF CVD Synchrony | Rainbow MatrixGENERAL OVERVIEW
MTF CVD Synchrony is a multi-timeframe directional flow oscillator that condenses five independent CVD (Cumulative Volume Delta) readings — one per Fibonacci-spaced timeframe — into a single weighted Master Line on a zero-centered 0-100 scale, surrounded by per-TF "ghost lines" that fade visually as they diverge from the consensus. The defining feature: 50 is true neutral. Above 50 means buyers are dominating; below 50 means sellers are dominating. The further from 50, the stronger the directional pressure. When the five timeframes align, the rainbow becomes a solid band; when they diverge, the disagreement becomes a visible density property of the indicator itself.
A background histogram visualizes the Master score's deviation from the neutral 50 line — green columns extend up when buyers dominate, red columns extend down when sellers dominate. A compact 7×9 MTF Legend Table surfaces every dimension simultaneously: per-TF resolutions, score values, trend direction, divergence flags, raw flow magnitude, and named directional State — with an antenna marker flagging the row whose timeframe matches your chart's native resolution.
Designed as the directional member of a three-indicator family. Apply all three side-by-side for a complete read: MTF RSI Synchrony shows where price sits in its momentum range; MTF Volume Delta Bar Synchrony shows whether the move has volume magnitude behind it; MTF CVD Synchrony shows who is actually winning — buyers or sellers. Same visual signature, same canonical Fibonacci ratios, same Legend Table layout — instant cross-indicator readability.
WHAT IS THE THEORY BEHIND THIS INDICATOR
Cumulative Volume Delta attempts to answer a question that price and volume alone cannot: in any given bar, were buyers or sellers more aggressive? Traditional volume tells you HOW MUCH traded, but not the DIRECTION of the pressure. A high-volume bar that closes flat tells a very different story from a high-volume bar that closes at its highs — yet raw volume scores them identically.
CVD approximates directional pressure by weighting each bar's volume by where price closed within its range. This indicator uses the Close Location Value (CLV) for that weighting:
clv = ((close − low) − (high − close)) / (high − low)
CLV ranges from +1 (close exactly at the high — maximum buying pressure) to −1 (close exactly at the low — maximum selling pressure), with 0 at the midpoint. Multiplying CLV by volume produces a signed directional contribution per bar: delta_raw = clv × volume. This is more nuanced than the binary tick rule (close > open = buy) used by most "delta" indicators — CLV captures HOW DECISIVELY price closed in its range, not just the sign.
The per-bar delta is then smoothed by EMA and normalized into a bounded 0-100 zero-centered score:
cvd_smooth = EMA(delta_raw, smoothing_length)
max_abs = highest(|cvd_smooth|, normalization_window)
score = 50 + (cvd_smooth / max_abs) × 50
The genius of the zero-centered approach: 50 always means balance, regardless of the asset's structural bias. A score of 75 means buyers are exerting 50% of the maximum recent pressure to the upside; a score of 25 means sellers are exerting 50% of maximum recent pressure to the downside. This is fundamentally different from a percentile rank (which would anchor 50 at the historical median, skewing with structural trends).
Five such scores — one per timeframe (default 5 / 15 / 60 / 240 / D) — are fused via canonical Fibonacci weights (0.15 / 0.20 / 0.25 / 0.25 / 0.15, peak weight on the macro TF3/TF4 where institutional positioning consolidates) into the weighted Master Line.
FEATURES
🔹 Multi-Timeframe CVD Fusion Engine (zero-centered directional scale)
🔹 CVD Histogram (deviation from neutral 50 — green buy / red sell)
🔹 Adaptive Fibonacci Channel (Z-Breathing → Z-Alert → Z-Exhaustion → Black Swan)
🔹 Hybrid Black Swan Zones (static or dynamic — default dynamic)
🔹 Classic Price↔CVD Divergence Detection (per-TF + Master)
🔹 MTF Legend Table (7 columns × 9 rows, with Raw Flow + State, multilingual)
🔹 Multilingual Interface (EN / PT / ES / RU / ZH)
🔹 Multi-Timeframe CVD Fusion Engine
What It Does
Runs five independent CVD scores on Fibonacci-spaced timeframes and fuses them into a single weighted Master Line, with each per-TF reading plotted as a ghost line that fades by distance to the consensus.
Method
On each timeframe, f_cvd_full() computes CLV × volume per bar, smooths it via EMA, and normalizes against a rolling-max window to produce the zero-centered score. The five scores fuse via Fibonacci weights (0.15 / 0.20 / 0.25 / 0.25 / 0.15). Both smoothing length and normalization window are independently configurable per timeframe.
Per-TF smoothing defaults (Wilder-anchored on TF3+TF4):
◇ TF1 (5m): 7 — scalping
◇ TF2 (15m): 10 — day-trading
◇ TF3 (60m): 14 — Wilder canonical
◇ TF4 (240m): 14 — Wilder canonical
◇ TF5 (D): 21 — swing/position
Per-TF normalization windows (each TF's natural horizon):
◇ TF1: 30 (≈2.5h on 5m)
◇ TF2: 50 (≈12.5h on 15m)
◇ TF3: 80 (≈3.3 days on 1h)
◇ TF4: 100 (≈16 days on 4h)
◇ TF5: 150 (≈5 months on Daily)
All request.security calls use lookahead=barmerge.lookahead_off for anti-repaint integrity.
Why It Matters
A 5-minute buy surge means little if the 4-hour and daily flows are decisively selling. The fusion engine reveals whether directional pressure is aligned across timescales (high conviction) or contradictory (a counter-trend bounce inside a larger trend). The ghost-line rainbow makes that alignment visible at a glance.
🔹 Adaptive Fibonacci Channel
What It Does
Six color-coded bands around the Master Line that adapt to its own recent volatility, using the brand's canonical Fibonacci ratios.
Method
Highest/lowest of the Master over a configurable lookback (default 50) are smoothed by EMA (default 10) to form the channel envelope. Bands sit at canonical Fibonacci proportions: Z-Breathing (1.50/1.85), Z-Alert (1.85σ anchor), Z-Exhaustion (2.75/1.85), Black Swan (3.85/1.85). All six band values are mathematically clamped to before rendering, keeping the rainbow inside the visible pane.
Why It Matters
Static thresholds can't adapt to regime changes. The Fibonacci channel calibrates the warning zones to the asset's current directional-flow volatility, so a "climax" on a calm pair and a "climax" on a volatile one both trigger at appropriate statistical extremes.
🔹 Hybrid Black Swan Zones
What It Does
Flags directional flow climax extremes — either at static 85/15 thresholds (BUY CLIMAX / SELL CLIMAX boundaries) or at the dynamic Fibonacci 3.85σ band.
Method
Dynamic Black Swan Mode is ON by default (Fibonacci 3.85σ proportion of the Master channel). Toggle OFF for static 85/15. Each zone renders as a glow line that brightens as the Master approaches. The static reference lines (15/50/85) are shown by default to anchor the zero-centered scale: 85 = purple (buy climax boundary), 50 = yellow (neutral), 15 = aqua (sell climax boundary).
Why It Matters
Directional flow climaxes mark exhaustion points — a BUY CLIMAX (score ≥ 85) means buyers have pushed to a recent extreme, often preceding a pause or reversal; a SELL CLIMAX (≤ 15) marks capitulation. The dynamic mode self-calibrates per asset and regime.
🔹 Classic Price↔CVD Divergence Detection
What It Does
Detects regular bear divergences (price higher high while CVD makes lower high — rally on weakening buy pressure) and bull divergences (price lower low while CVD makes higher low — selling exhausting). Runs on each timeframe AND on the Master line.
Method
Per-TF divergence runs inside request.security via pivot detection on the per-TF CVD score. Master divergence runs on the chart-TF directly, rendering a connecting line + label between pivots (red bear / green bull) on the pane. Per-TF results surface in the Legend Table's "Div" column.
Why It Matters
Price↔flow divergence is one of the most powerful applications of CVD. When price makes a new high but directional flow doesn't confirm, the rally is running on fading conviction — a classic distribution warning. Detecting this per-TF AND on the Master gives both early granular warnings and high-conviction confirmations.
🔹 MTF Legend Table
What It Does
A compact 7×9 table surfacing every dimension of the analysis at a glance.
Method
Rendered via table.new(force_overlay=false) on the pane. Layout:
◇ Row 0: title (spans all columns)
◇ Row 1: column headers — Indicator / Timeframe / Value / Trend / Div / Raw / State
◇ Rows 2-6: per-TF data
◇ Row 7: Master row ("🌈 Master (~XhYm)" with effective TF)
◇ Row 8: MTF Divergence status row
Per-TF cells show: ● TF label (+ antenna 📡 if chart-native), TF resolution, zero-centered score (zone-colored), trend arrow (±0.5 deadzone), divergence (🔺/🔻/—), Raw Flow (compact K/M/B signed magnitude, green if positive / red if negative), and State (directional name, zone-colored).
Why It Matters
The Raw Flow column complements the Value column: Value answers "how strong is the directional pressure?" (the normalized score), while Raw answers "how much actual volume is behind it?" (the absolute flow). A score of 75 with a small raw magnitude is weaker conviction than 75 with a huge raw magnitude. Together with State, the table tells a complete directional story per timeframe.
🔹 Multilingual Interface
What It Does
Translates all HUD labels, status messages, alert text, Legend Table headers, and directional State names to 5 languages: English, Português, Español, Русский, 中文.
Method
A single language dropdown selects the active language via Pine v6's ternary-chain pattern. Code, comments, and configuration tooltips remain in English by convention.
Why It Matters
The Rainbow Matrix family is built for traders worldwide. Multilingual UI removes friction for non-English-native users.
HOW TO USE
Reading the Pane
◇ Master near 50 with ghost lines tight: balanced flow, no directional edge (absorption / equilibrium).
◇ Master rising above 50: buyers gaining control. Above 62 = BUY PRESSURE; above 71 = STRONG BUY.
◇ Master falling below 50: sellers gaining control. Below 38 = SELL PRESSURE; below 29 = STRONG SELL.
◇ Master touches Black Swan High (≥85, purple glow): BUY CLIMAX — buyers at a recent extreme, watch for exhaustion.
◇ Master touches Black Swan Low (≤15, aqua glow): SELL CLIMAX — capitulation, watch for reversal.
◇ Histogram green/red columns: immediate bar-by-bar directional read around the 50 centerline.
Reading the Legend Table
The antenna marker (📡) flags your chart's native timeframe — start there, then scan up/down to see whether faster/slower TFs confirm or contradict the directional bias. Compare Value (pressure strength), Raw (actual flow magnitude), and State (named classification) for each row. The status row summarizes MTF alignment between TF1 and TF5.
Reading Divergences
Master bear divergence (price up + CVD down) = rally on fading buy conviction, distribution warning. Master bull divergence (price down + CVD up) = selling exhausting, potential bottom. Per-TF divergences in the Div column give early granular warnings.
Tactical Combinations
◇ Master BUY CLIMAX + bear divergence + multiple TFs diverging = strongest reversal-from-high signal.
◇ Master SELL CLIMAX + bull divergence = strongest reversal-from-low signal.
◇ Master near 50 + all TFs near 50 + tight ghosts = absorption / coiling, often precedes a directional break.
◇ Triple confluence (the full family): RSI overbought + Volume EXTREME magnitude + CVD STRONG SELL = distribution at the top. RSI oversold + Volume EXTREME + CVD STRONG BUY = accumulation at the bottom. These three indicators answering momentum + magnitude + direction simultaneously is the strongest read the Rainbow Matrix family offers.
INPUTS EXPLAINED
GLOBAL SETTINGS — System Language (EN/PT/ES/RU/ZH), table/label font sizes.
MULTI-TIMEFRAME — AI Auto-Sync TFs; TF1-TF5 manual resolutions (default 5/15/60/240/D); per-TF CVD Smoothing Length (7/10/14/14/21); per-TF CVD Normalization Window (30/50/80/100/150).
ENGINE — Dynamic Black Swan Mode (default ON); Dynamic Channel Lookback (50) and Smoothing (10); Divergence Pivot Lookback (5).
VISUALIZATION — TF1-TF5 colors + show toggles (all ghost lines OFF by default — only Master visible on install); Ghost Fade Sensitivity (3.5); Show Master Line / Rainbow Fills / Black Swan / Dynamic Channel; Show CVD Histogram; Show MTF Legend Table; Show Divergence Column; Show Raw Flow Column; Show State Column; Show Master Divergence Chart Line; Legend position; Show Divergence Event Markers; Show Static Reference Lines (15/50/85, ON by default).
ALERTS — Black Swan crossings (high/low); Strong MTF Divergence; Z-Exhaustion zone entries; Master Classic Divergence.
IMPORTANT NOTES
🔸 Pine Script v6 — uses request.security with lookahead=barmerge.lookahead_off. 16 total security calls (5 CVD score + 5 per-TF divergence + supporting channel calculations). Chart load may take a moment longer than a single-TF indicator.
🔸 CLV approximation, not order-flow tick data — Directional pressure is approximated via the Close Location Value (where price closed within each bar's range), NOT real bid/ask order flow. Pine Script v6 has no tick-by-tick data access in indicator scripts. CLV is a more nuanced approximation than the binary tick rule used by most free-tier "delta" indicators, but it remains an approximation. For true order-flow delta, use dedicated footprint/order-flow tools.
🔸 Zero-centered scale — Unlike the percentile-rank siblings (RSI, Volume Delta Bar), this indicator's 50 is a TRUE neutral (zero net directional flow), not a historical median. This is intentional — direction is inherently signed, so a fixed zero-point is more meaningful than a regime-relative median.
🔸 Normalization warmup — During the first normalization_window bars on each TF, the rolling-max anchor (max_abs) is built from a small sample, so early bars may show exaggerated swings until the window fills. Normal warmup behavior for any rolling-window indicator.
🔸 Repaint behavior — Historical bars use confirmed close data; the current real-time bar updates as ticks arrive. Pivot-based divergence requires confirmation bars before triggering (standard pivot divergence behavior).
🔸 Fibonacci ratios are canonical — The channel proportions (1.50/1.85/2.75/3.85) and fusion weights (0.15/0.20/0.25/0.25/0.15) match the Rainbow Matrix brand standard across all sibling indicators, preserving cross-indicator visual consistency.
🔸 License: MPL 2.0 — open source. Free to fork, modify, and republish under the same license terms.
UNIQUENESS
Three pillars differentiate this from other CVD indicators on TradingView:
1. Multi-timeframe CVD fusion with synchrony as a visual property. Most CVD tools run on a single timeframe. This indicator runs five, fuses them via Fibonacci weights, and expresses directional alignment as a rainbow density — solid when timeframes agree on direction, spread when they disagree. The cross-TF directional consensus becomes immediately readable.
2. True zero-centered scale with CLV weighting. The 50 midpoint is a mathematically meaningful neutral (zero net flow), not a regime-skewed median. And the directional weighting uses Close Location Value — capturing how decisively price closed within each bar's range — rather than the cruder binary tick rule. This combination produces a directional read that stays honest across structural trends.
3. Three complementary readings in one Legend Table, designed as a family. Value (pressure strength), Raw Flow (actual magnitude), and State (named classification) disambiguate a single timeframe's directional picture. And as the directional member of the Rainbow Matrix trio (alongside RSI for momentum and Volume Delta Bar for magnitude), it completes a three-dimensional read of any market: where price is, how big the move is, and who's winning.
Rainbow Matrix AI | Multi-timeframe institutional analysis tools for traders.
🌐 rainbowmatrix.ai
✉️ Contact: contact@rainbowmatrix.ai
Indicador

Guppy MMA Mean Reversion SignalsThe Guppy MMA Mean Reversion System is a trend-following mean reversion tool designed to identify high-probability pullbacks within established trends. By combining the classic Guppy Multiple Moving Average (GMMA) with volatility, volume, and momentum filters, this script aims to reduce the "noise" often found in standard moving average cross strategies.
The Concept: Why this Works
Standard GMMA indicators are excellent for visualizing trend strength but often lack precise entry triggers or filters to avoid entering during periods of low volume or extreme exhaustion. This script addresses these limitations by integrating four distinct analytical components:
- GMMA Ribbons (Trend & Reversion Zones) : We use two groups of EMAs (Short-term and Long-term). The Long-term group defines the "institutional" trend. Our entry logic looks for price to revert from the short-term trend back into the long-term trend zone—a classic sign of a healthy pullback.
- CVD Confluence (Volume Confirmation) : Using Cumulative Volume Delta (CVD) based on candle-body delta approximations, the script ensures that volume flow supports the entry direction. This prevents entering pullbacks that lack the necessary buying/selling pressure to resume the trend.
- ATR Volatility Filter (Statistical Spacing) : To avoid "choppy" entries, this filter requires the price to be at a statistically significant distance from the EMA based on market volatility (ATR). This ensures you are entering at a true "discount" rather than in a sideways market.
- RSI Exhaustion Filter (Momentum Safety) : We utilize RSI to ensure that a reversion hasn't reached an overextended state. For example, it prevents buying a pullback if the RSI indicates the asset is already in an overbought exhaustion phase.
How to Use
- Long Entries (Green Circles) : Triggers when the Long-term ribbon is bullish, and price pulls back to touch the Long-term EMA group, provided the CVD, ATR, and RSI conditions are met.
- Short Entries (Red Circles) : Triggers when the Long-term ribbon is bearish, and price rallies to touch the Long-term EMA group, filtered by volume and momentum.
- Exits (Labels) : Exit signals appear when price successfully reverts back to the "fast" Short-term group, marking the completion of the mean reversion move.
Key Features & Customization
- Independent Toggles : You can independently turn on/off buy signals, sell signals, and their respective exits to suit your specific trading style (e.g., only trading the long side).
- Signal Cooldown : Includes a customizable "bar count" cooldown to prevent multiple overlapping signals during high-volatility periods.
- Comprehensive Settings : Fully adjustable EMA lengths, ATR multipliers, and RSI thresholds to adapt the system to different timeframes and asset classes (Crypto, Forex, Stocks).
Settings Guide
- Use ATR Filter : Increase the multiplier for more conservative, wider entries.
- Use CVD Filter : Enable to ensure volume delta is trending with your entry.
- Use RSI Filter : Helps avoid "catching falling knives" by filtering out trades during extreme momentum spikes. Indicador
