Order Flow PRO - Delta and ImbalanceOrder Flow PRO - Delta and Imbalance
OVERVIEW
Order Flow PRO is a volume-pressure panel for TradingView that visualizes estimated buying vs selling pressure per bar, cumulative delta, stacked imbalances, and price-delta divergence.
It helps assess whether price movement is supported by participation or developing under weakening internal conditions.
Important: TradingView does not provide true bid/ask transaction data for most instruments. Delta is estimated from bar structure and volume - not real institutional footprint.
Built by the Xcelerate Trade team.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BEST USED WITH
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Works much better together with:
- Fluid Liquidity Zones - CHoCH + Mitigation + HTF | Xcelerate Trade
(or Fluid Liquidity Zones - CHoCH | Xcelerate Trade)
- Order Flow Footprint and Delta (OF1 / OF2 / OF3 overlay on chart)
Use SUPPLY / DEMAND zones + CHoCH / market structure first, then delta / imbalance as confirmation.
CONCEPT
Order flow analysis studies aggression and participation behind price. On TradingView, that is approximated from open/high/low/close and volume.
Use this indicator as a confluence layer after higher-level context (structure, liquidity zones, sessions) - not as a standalone entry system.
FEATURES
- Volume Delta histogram (green = bullish bar pressure, red = bearish)
- Delta MA smoothing line
- Cumulative Delta (normalized line)
- Stacked imbalance detection (3+ consecutive imbalance bars) - BUY / SELL markers
- Price-Delta divergence warnings
- Live dashboard: Delta, Cum. Delta, Volume, Pressure, Imbalance, Signal
- Dashboard position options and optional overlay on the price chart
- Alerts: stacked buy/sell imbalance, bullish/bearish divergence, extreme buying/selling pressure
HOW TO USE
1) Add the indicator on a separate pane below price (5m / 15m / 30m intraday)
2) Read Volume Delta for bar-by-bar pressure; use Cumulative Delta for session bias
3) Stacked imbalances: mark the zone, wait for pullback, confirm with structure - do not chase
4) Divergence: strongest near key levels + high volume; confirm with price action
5) Combine with Fluid Liquidity Zones and market structure before acting
RECOMMENDED SETTINGS
- Timeframes: 5m, 15m, 30m
- Delta MA Period: 20 (default)
- Imbalance Threshold: 0.7 (lower = more signals, noisier)
SKIP / AVOID
- Treating estimated delta as real bid/ask footprint
- Trading every imbalance or dashboard signal without structure context
- Ignoring high-impact news windows (volatility can distort delta)
- Using divergence alone as a guaranteed reversal call
LIMITATIONS
- Delta values are estimated due to platform data constraints.
- Results differ from platforms with exchange-level bid/ask feeds.
- Imbalance and divergence show structural conditions, not trade instructions.
- This script does not place trades and does not guarantee results.
- Always combine with your own risk management and market context.
指标

Fair Value Gap (FVG) Statistics with Placebo Control█ OVERVIEW
On the same instrument, measured against a 50% baseline, fair value gaps looked significantly profitable in one period and significantly unprofitable in another. Both readings were artifacts of a baseline that was never 50%.
This indicator measures what actually happens after price returns to a gap, then compares the result against fake, or placebo, zones of the same size placed at bars where no gap occurred. Because a hit rate tells you nothing until you know what a meaningless zone scores on the same chart.
The following description consists of two parts. Part 1 is written in plain English and covers everything most readers need. Part 2 contains the full methodology and results for anyone who wants to examine the numbers in detail.
═══════════════════════════════════════
PART 1 — WHAT THIS IS AND WHY
═══════════════════════════════════════
█ THE PROBLEM
Zone-based tools are everywhere: fair value gaps, order blocks, breakers, imbalances. Yet almost none of them tell you how often a zone actually led anywhere. And when a number is quoted, it is often built on one of three flawed foundations.
1. The zone is counted before it could have been known.
This problem is easiest to see with order blocks. An order block is commonly defined as the last opposite candle before a move that breaks structure. That means the block cannot be identified until the structure break occurs, often several bars later. Yet it is drawn back on the earlier candle as though it had been known at the time.
Any hit rate measured from that earlier candle therefore counts a zone that nobody could actually have traded.
Fair value gaps suffer less from this problem because their three-bar pattern completes quickly, but the same principle applies: a zone becomes active only when it becomes knowable, and nothing before that bar should be counted.
2. Failed zones disappear.
Many tools remove a zone from the chart once price has passed through it. That makes sense for keeping a chart clean. It is disastrous for statistics, because the zones being removed are disproportionately the ones that failed.
Count only what remains on the chart and you are counting the survivors.
3. The hit rate is compared with 50%.
This is the most important problem, and it is extremely common.
The reasoning seems straightforward: if the target and stop are equally far from the entry, then no edge should mean a 50/50 outcome.
But a rule that enters when price reaches a level inherits a baseline from the way price moves. That baseline is not necessarily 50%. It changes with the instrument, direction, and market conditions. Across the three markets tested here, it ranged from roughly 45% to 55%.
A hit rate by itself therefore tells you very little.
What matters is how the same measurement performs on zones that have no informational meaning at all.
█ WHAT THIS INDICATOR DOES
For every real fair value gap the indicator identifies, it also generates placebo zones of the same height, direction, and distance from price, anchored at bars where no fair value gap occurred.
Real and placebo zones are then measured by exactly the same rules.
The difference between them — real minus placebo — is the result that matters.
If real gaps perform like the placebo zones, then the pattern is not adding anything, regardless of how attractive the raw hit rate may look.
The placebo comparison does not ask whether fair value gaps win more than 50% of the time.
It asks a harder question:
Do fair value gaps perform better than comparable zones that carry no fair value gap information at all?
█ HOW THE COMPARISON IS KEPT FAIR
Statistical libraries for Pine already exist, and many indicators will draw fair value gaps. What is not otherwise available is a matched control built into the measurement itself, so that every figure the indicator reports arrives together with the baseline it should be judged against.
Three design choices make that possible, and they only work together.
A matched placebo control. Each placebo zone has the same height, the same direction, and the same distance from price as the real zone it is meant to compare with. Both are scored by identical rules.
Confirmation-honest timing. A zone enters the sample only when it becomes knowable, never earlier. Every confirmed zone remains in the sample from that point onward, including zones that fail immediately.
Bias controls that are reported rather than hidden. Cases that are genuinely difficult to score — such as bars that touch both exits and trades that never resolve — are counted and displayed for real and placebo zones side by side. Ambiguous cases are treated conservatively rather than silently discarded.
The combination matters. A matched control is useful only if both sides are measured under the same timing and scoring rules.
█ WHAT THE TESTS FOUND
Across three asset classes, three timeframes, and two separate periods — fourteen measurements in total — fair value gaps showed no detectable advantage over size-matched zones placed at meaningless bars.
The difference remained below about one percentage point of hit rate, and none of the fourteen individual measurements reached conventional statistical significance.
That is a bound on what was observed, not a claim that the true effect is exactly zero.
A different market or a different period could produce a different result. That is precisely why the comparison is built into the tool rather than left as an assumption or a footnote.
The broader conclusion is more useful:
A hit rate quoted without its baseline does not tell you whether something works. On the same instrument, measured against 50%, this pattern looked significantly profitable in one period and significantly unprofitable in another. Both readings were created by the baseline, not by the gaps.
That lesson applies to zone-based tools generally, not only to fair value gaps.
If you take one thing from this script, take that.
█ HOW IT WAS TESTED
A single result on a single chart is easy to produce and easy to overinterpret. Before publication, the same measurement was therefore repeated while changing one assumption at a time.
Three asset classes — crypto, currencies, and equity index futures
Three timeframes — 5 minutes, 30 minutes, and 1 hour
Two separate, non-overlapping time periods
Three different target and stop distances
Two different limits on how long a trade could remain open
Each of these choices is partly arbitrary. If a finding appears only under one particular setting, it may belong to the setting rather than to the market.
Fourteen separate measurements were made in total.
Two standard statistical tools are used. A confidence interval shows the range in which the underlying value plausibly lies, which is more informative than a single headline estimate. Results from independent markets are also combined so that their evidence can be considered together rather than one chart at a time.
The measurement procedure was additionally checked against artificial data for which the correct answer was known in advance. This allowed the method itself to be tested independently of any market result.
█ HOW TO READ AND USE THE INDICATOR
Add the indicator to any chart. It works on any symbol and any timeframe and needs no configuration to produce a result.
The panel
By default, the panel shows a compact view: the number of zones found, the number revisited by price, the hit rate with its confidence interval, the placebo baseline, and the difference between real and placebo.
Turn off Compact panel for the full breakdown: wins, losses, unresolved cases, the direction split, and side-by-side rates for the cases that are hardest to score.
Everything used to produce the headline result is available for inspection.
Reading the result
Check the sample size first. Below roughly 1000 resolved zones, the confidence interval is usually too wide to conclude much. Recognizing that the sample is inconclusive is a valid result, not a failure of the indicator. Lower timeframes and longer histories both increase the sample.
Then read real − placebo . That is the headline result.
A positive number means the gaps outperformed the placebo zones. A negative number means they underperformed them.
The z-score beside it indicates how far the observed difference sits from what chance alone can produce. As a rough guide, an absolute z-score below 2 is not conventionally distinguishable from noise.
The raw hit rate is shown for context, not as the answer. Judging the pattern from that number alone is the mistake this indicator is designed to expose.
Setting up a measurement
To measure a specific period, turn on Limit to date range and set the dates.
The panel reports the sample actually achieved. This can be shorter than the requested period if the chart has not loaded enough historical data, so scroll left when necessary to load more history.
To check whether a result depends on your choice of exits, change Barrier size and run the measurement again. A finding that appears only at one setting may belong to the setting rather than to the pattern.
As a chart indicator
Zones are drawn as they form and can also be used in the usual visual way.
A zone that price has not yet returned to is drawn solid and continues extending to the right while it remains open.
When price reaches the zone, the box stops extending and fades to a dotted outline. The width of a completed box therefore shows how long that gap survived before price returned to it, while the chart makes it easy to see which zones remain active.
Turning off Draw real zones leaves only the statistics panel.
█ SETTINGS
Measurement — Risk unit selects whether exit distance scales with ATR or with the zone's own height. Barrier size sets that distance. Time limit controls how many bars a trade may remain open before being recorded as unresolved.
Entry price and Evaluate exits on the entry bar provide alternative scoring conventions so their effect can be measured rather than assumed. Both are labeled where they introduce a known bias.
Minimum zone height filters out small gaps. Exclude overlapping zones and Overlap lookback prevent several gaps created by the same move from being treated as independent observations.
Sample — restricts the measurement to a date range, entered as year, month, and day so the sample remains reproducible.
Placebo control — Placebos per zone sets how many comparison zones each real zone generates; more placebos produce a tighter estimate of the baseline. Placebo offset controls how far from the original bar the comparison zones are anchored.
Validation — replaces market price with a random walk so the measurement can be checked against data whose correct answer is known in advance rather than only against real markets.
Display — Compact panel shows the headline rows only; turning it off reveals the full breakdown. Draw real zones toggles the boxes on the chart.
═══════════════════════════════════════
PART 2 — DETAILED ANALYSIS
═══════════════════════════════════════
█ HOW A ZONE IS SCORED
A gap becomes active on the bar after its three-bar pattern closes. From that point onward, every confirmed zone remains in the sample, including zones that fail immediately.
When price returns to a zone, the entry is recorded at that bar's close , not at the zone edge.
This matters more than it may appear.
A touch condition means that price reached or passed the edge, so the bar may have overshot it by an unknown amount. Assuming a fill at the edge while beginning the measurement only from the following bar would start the trade from an artificial price and can systematically distort the result.
Two exits are then placed at equal distances on either side of the entry. Because the exits are symmetric, real and placebo zones can be compared directly.
If one bar touches both exits, its open, high, low, and close do not reveal which level was reached first. Those cases are shown separately and counted as losses, making the published result the conservative one.
Zones that reach neither exit within the time limit are excluded from the hit-rate calculation. They did not resolve, so they provide no evidence for either outcome.
█ RESULTS
Results below use the following settings. The sample ends 1 August 2026.
SETTING VALUE
Risk unit (R) ATR(14) at confirmation
Barrier 2.0 R each side
Time limit 100 bars after entry
Entry close of the touch bar
Overlapping zones excluded
Placebos per zone 3
Three markets, 30-minute charts, 2025-01-01 to 2026-08-01:
INSTRUMENT RAW NAIVE z PLACEBO REAL-PLAC
BTCUSDT 49.5% -0.67 49.0% +0.5
EURUSD 51.4% +1.65 51.7% -0.2
ES1! 49.2% -0.92 49.9% -0.7
POOLED -0.04
The panel on the chart above is not restricted to that fixed window — it runs to the most recent bar — so its figures differ slightly from the table. That is expected: it is a different sample, not a different result.
Read the raw column alone and the markets appear different: 49.5% for crypto versus 51.4% for currencies, a spread of 1.9 percentage points.
Now look at the placebo column. Its spread is 2.7 points.
The apparent difference between markets is therefore better explained by the baseline than by the fair value gaps themselves.
One example makes the problem especially clear:
BTCUSDT, 1 hour, calendar year 2024
Raw hit rate 54.0% (n = 1390)
Naive z vs 50% +2.95 "significant"
Placebo baseline 51.5%
Real minus placebo +2.5% z 1.49, not sig.
Against an assumed 50% baseline, a 54% hit rate gives a p-value near 0.003 — exactly the kind of number that can look compelling when published in isolation.
Against its observed control baseline, however, the evidence is not statistically significant.
The same indicator, on the same instrument, over a different period and with a tighter target, produced a raw hit rate of 48.4% with a z-score of -2.25 — apparently significant in the opposite direction.
Both apparent conclusions arise from comparing with an assumed 50% baseline rather than the observed control baseline.
█ ROBUSTNESS
DIMENSION TESTED RESULT
Barrier size 1R / 2R / 3R no change
Time limit 50 / 100 bars no change
Asset class crypto / FX / index no change
Timeframe 5m / 30m / 1h no change
Period 2024 / 2025-26 no change
Across fourteen separate estimates of real minus placebo, the largest result was 1.49 standard errors from zero.
With fourteen estimates, even if the true effect were zero, the largest absolute result would be expected to reach roughly 1.9 standard errors by chance alone.
Pooled across three independent markets, the estimate was -0.04 percentage points, with a 95% interval of approximately -1.2 to +1.1 points.
█ LIMITATIONS
One symbol and one timeframe can be analyzed per chart. Pine cannot pool results across markets, so each chart represents one sample rather than proof by itself. The pooled figures reported above were combined separately.
Trading costs are not included. Entries assume execution at the bar close with no spread, commission, or slippage. Real-world trading costs would make absolute performance worse.
Ambiguous bars are counted as losses. This lowers both real and placebo hit rates by roughly the ambiguous-case rate and therefore tends to cancel when the difference between them is calculated.
The bull and bear rows should not be interpreted independently in a trending market.
The placebo control matches zone size, direction, and distance from price, but it cannot match the fact that a real gap forms immediately after a strong move in the same direction.
For example, in an uptrend, a fake bearish zone is more likely to be run over by the prevailing trend, whereas a real bearish gap can only form after an actual downward move. These effects work in opposite directions and largely cancel in the combined result.
For that reason, the total should be treated as the primary statistic rather than the directional split.
This limitation was identified during testing and is the main known weakness of the methodology.
Finally, all results come from a sample. Another market or another period may produce a different estimate. That uncertainty is the reason the placebo comparison is built into the indicator rather than assumed away.
█ METHOD AND PRIOR WORK
None of the statistics here are new, and it is worth being clear about that.
Assigning a treatment to units or moments where it did not actually occur, then checking that no effect appears, is a standard falsification test in causal inference, where it is usually called a placebo test. The placebo zones in this indicator are that idea applied to bars instead of subjects.
The trading application is not new either. David Aronson's Evidence-Based Technical Analysis (2006) argues that a rule should be judged against the returns of random entry signals rather than against zero, and uses Monte Carlo permutation and White's Reality Check to do it.
The scoring rule — a target, a stop, and a time limit, whichever is reached first — is the triple-barrier method described by Marcos López de Prado.
What this script adds is not the method but its availability. The control is generated and scored automatically alongside the real zones, on any chart and any symbol, so the baseline arrives together with the number instead of requiring a separate study that most people will never run.
█ OPEN SOURCE
The source is open. Every figure above can be reproduced — or shown to be wrong — by anyone who wants to check it.
Order blocks are next, measured by the same rule: from the bar that breaks structure, not from the earlier candle on which the block is drawn.
指标

指标

Order Flow Footprint & DeltaOrder Flow Footprint & Delta
OVERVIEW
Order Flow Footprint & Delta is a candle + volume proxy scanner for the Order Flow playbook on TradingView.
It marks three educational setups — OF1 Continuation, OF2 Absorption reversal, and OF3 Break & retest — using structure bias, volume impulse, absorption proxies, and break/retest logic.
Important: TradingView does not provide true bid/ask footprint data for most symbols. This script uses candle and volume proxies. The on-chart dashboard shows Proxy = no footprint.
Built by the Xcelerate Trade team.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BEST USED WITH
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Works much better together with:
→ “Fluid Liquidity Zones - CHoCH + Mitigation + HTF | Xcelerate Trade”
(or “Fluid Liquidity Zones - CHoCH | Xcelerate Trade”)
Use SUPPLY / DEMAND zones + CHoCH / market structure first, then OF labels as confirmation.
CONCEPT
Order flow tools help traders read aggression and reaction around levels. On TradingView, those ideas are approximated from open/high/low/close and volume.
Use this indicator as confirmation after higher-level context (supply/demand or liquidity zones + market structure), not as a standalone entry system.
GOLDEN RULE
Zone (SUPPLY/DEMAND) + structure first → then OF1/OF2/OF3 as confirmation — never the reverse.
Recommended timeframes: 15m–1h. Lower timeframes (1m/3m) are noisier and produce more false signals.
HOW THE SETUPS WORK
OF1 — CONTINUATION (cyan)
Idea: trend + stacked impulse + pullback + continuation.
Long OF1 when:
1) Bull bias (HH/HL structure + optional HTF up filter)
2) A bullish impulse / stacked strong bars existed
3) Price pulled back into the impulse zone
4) Confirmation (bullish bar / positive delta proxy)
Short OF1 is the mirror for bearish continuation.
OF2 — ABSORPTION REVERSAL (violet)
Idea: sweep of a level + absorption + reclaim.
Long OF2 when:
1) Sweep below a low / level (wick down)
2) Absorption (high volume, little progress)
3) Reclaim above the level with upside aggression
Short OF2 is the mirror after a sweep above a high.
OF3 — BREAK & RETEST (green long / red short)
Idea: volume break → retest → rejection.
Long OF3: break up → retest broken level as support → rejection up.
Short OF3: break down → retest as resistance → rejection down.
FEATURES
• Toggle OF1 / OF2 / OF3 independently
• Structure bias with optional HTF filter for OF1
• Volume / delta / imbalance / absorption proxies
• Optional break level lines
• Live dashboard (bias, delta proxy, stack status, setup wait/active)
• Alerts for each OF1/OF2/OF3 long and short condition
HOW TO USE (WITH FLUID LIQUIDITY ZONES)
1) Read bias / structure (HH HL / LH LL, CHoCH) for higher-level direction
2) Note where price is: DEMAND = long bias area, SUPPLY = short bias area
3) Then use OF labels:
• DEMAND + OF2 or green OF3 → long candidates
• SUPPLY + OF2 or red OF3 → short candidates
• OF1 only with the trend (not counter-trend in a range)
4) Dashboard “wait” means no signal on the current bar; older labels remain on history
SKIP / AVOID
• Bias = RANGE and you are not clearly on a zone
• Labels in the middle of a range with no level
• OF1 against SUPPLY/DEMAND
• Chaotic OF1+OF2+OF3 overlap with no clear level
• Acting on a label alone with no zone/structure context
EXAMPLES
• DEMAND + green OF3 / OF2 → look for LONG after reclaim/confirm
• SUPPLY + red OF3 / OF2 → look for SHORT
• Cyan OF1 in uptrend, pullback into DEMAND → continuation LONG
• Label only, no zone/structure → do not enter
LIMITATIONS
• This is not real footprint / DOM / bid-ask data. Signals are proxies and can be wrong.
• Especially noisy on 1m/3m charts.
• The script does not place trades and does not guarantee results.
• Always combine with your own risk management and market context.
指标

MSH - Demand & Supply Zones Pro### Overview
The Demand and Supply Zones Pro indicator automatically identifies, plots, and tracks institutional market structure imbalance zones on your chart. Based on core Extended Market Structure (EMS) price action principles, it highlights areas where institutional supply or demand imbalances cause rapid price movements.
### Features & Methodology
1. Zone Identification Logic:
The indicator evaluates individual candlestick body-to-range ratios to classify candle types into:
- Base Candles: Consolidation or low-volatility bars where body size is ≤ 50% of total candle range.
- Leg-In / Leg-Out Candles: High-momentum, strong-body expansion candles.
2. Pattern Classifications (RBR, DBR, RBD, DBD):
- Demand Zones: Rally-Base-Rally (RBR) and Drop-Base-Rally (DBR).
- Supply Zones: Rally-Base-Drop (RBD) and Drop-Base-Drop (DBD).
3. Dynamic Zone Tracking & Boundaries:
- Proximal Line: Plotted at the top/bottom boundary of the base body for entry reference.
- Distal Line: Plotted at the extreme high/low wick of the base for stop-loss and risk reference.
- Dynamic Extensions & Violation Cleanup: Active zones extend automatically to current price action and are automatically removed once invalidating price breaks occur.
4. Trend & Moving Average Overlays:
- Includes integrated Rapid (EMA 7) and Fast (EMA 21) Exponential Moving Averages to quickly assess short-term momentum and trend alignment alongside zone levels.
### How to Use
- Looking for Demand Trades (Long): Seek long setups when price revisits active Green/Demand zones, especially when aligned with short-term EMA momentum.
- Looking for Supply Trades (Short): Seek short setups when price approaches active Red/Supply zones.
- Risk Management: Use the Distal boundary of the zone as a structural stop-loss level.
### Settings & Customization
- Candle Rules: Adjust body percentage thresholds for Base, Leg-In, and Leg-Out candles to match different asset classes (Equities, Forex, Crypto, Futures).
- Display Limits: Set maximum active zones displayed concurrently to maintain chart clarity.
- Visuals: Fully customizable zone fill, border colors, and label options. 指标

The Ultimate Indicator by @JustinPerezTrades**Combined LuxAlgo Indicator**
**SMC + HTF PO3 + Opening Range Breakouts & Targets**
This is a single, all-in-one TradingView indicator that merges three popular LuxAlgo tools:
1. **Smart Money Concepts (SMC)** – Market structure, order blocks, fair value gaps, equal highs/lows, premium/discount zones, etc.
2. **HTF PO3** – Higher-timeframe candle projections with open/high/low/close mapping and volume delta.
3. **Opening Range Breakouts & Targets (ORB)** – Opening range, breakout signals, measured targets, and session moving average.
Everything runs on one chart with organized input groups so you can turn features on/off independently.
---
### What Each Section Does
#### 1. Smart Money Concepts (SMC)
- **Internal & Swing Structure** → Shows BOS (Break of Structure) and CHoCH (Change of Character).
- **Order Blocks** → Internal and Swing order blocks (bullish/bearish).
- **Equal Highs / Equal Lows** → Liquidity levels.
- **Fair Value Gaps (FVG)** → Imbalance zones.
- **Strong/Weak Highs & Lows** → Current swing extremes labeled.
- **Premium / Discount / Equilibrium Zones** – Based on the current swing range.
- **Multi-Timeframe Highs & Lows** (Daily / Weekly / Monthly).
- Optional candle coloring based on internal trend bias.
#### 2. HTF PO3
- Projects higher-timeframe candles to the right of the chart.
- Shows Open, High, Low, Close levels with dashed connectors from the live chart.
- Displays running volume **Delta** for the current HTF candle.
- Useful for seeing where the higher timeframe is currently building its candle.
#### 3. Opening Range Breakouts & Targets (ORB)
- Draws the Opening Range (default 30-minute, or custom session).
- Marks OR High, OR Low, and midpoint.
- Breakout signals (▲ / ▼) with optional Daily Bias filter.
- Automatic measured targets based on a percentage of the Opening Range width.
- Adaptive or Extended target display.
- Optional session-based Moving Average that resets every day at the Opening Range start.
---
### How to Use the Indicator
#### Step 1 – Add to Chart
1. Open TradingView Pine Editor.
2. Paste the full combined script (make sure it starts with `//@version=6` and has **no** markdown backticks or notes at the top/bottom).
3. Click **Save** → **Add to chart**.
#### Step 2 – Organize the Inputs
The settings are clearly grouped:
| Group Name | What it controls |
|-------------------------------------|--------------------------------------|
| **SMC - Smart Money Concepts** | Overall SMC mode & style |
| **SMC - Real Time Internal Structure** | Internal BOS/CHoCH |
| **SMC - Real Time Swing Structure** | Swing BOS/CHoCH + swing points |
| **SMC - Order Blocks** | Internal & Swing OBs |
| **SMC - EQH/EQL** | Equal Highs / Lows |
| **SMC - Fair Value Gaps** | FVG settings |
| **SMC - Highs & Lows MTF** | Daily/Weekly/Monthly levels |
| **SMC - Premium & Discount Zones** | Premium / Equilibrium / Discount |
| **HTF PO3 - Higher Timeframe Settings** | HTF timeframe, candles shown, offset |
| **HTF PO3 - Visual Style** | Colors, labels, delta |
| **ORB - Historical Display** | Keep or clear previous sessions |
| **ORB - Opening Range** | OR timeframe |
| **ORB - Custom Range** | Custom session times |
| **ORB - Breakout Signals** | Signal style & bias filter |
| **ORB - Targets** | Target % and display mode |
| **ORB - Session Moving Average** | Optional MA |
| **ORB - Style** | Colors and line styles |
#### Step 3 – Recommended Starting Setup
**For most traders:**
- **SMC**
- Mode: `Historical`
- Show Internal Structure: On
- Show Swing Structure: On
- Internal Order Blocks: On (size 5)
- Equal High/Low: On
- Fair Value Gaps: Off (or On if you use them)
- Premium/Discount Zones: On
- **HTF PO3**
- HTF Timeframe: `60` (or `240` / `D` depending on your style)
- Candles to Show: `1` or `2`
- Show Price Labels: On
- Show Running Delta: On
- **ORB**
- Time Period: `30` (or match your market’s opening range)
- Show Breakout Signals: On
- Signal Bias: `No Bias` (or `Daily Bias` if you want stricter signals)
- Show Targets: On
- Target % of Range: `50`
- Target Display: `Adaptive`
#### Step 4 – Practical Workflow
1. **Mark the Opening Range** first (ORB section).
2. Wait for a breakout of OR High or OR Low → look for the signal.
3. Use **SMC structure** to confirm the direction (BOS / CHoCH).
4. Check if price is interacting with an **Order Block** or **Fair Value Gap**.
5. Glance at the **HTF PO3** projection to see where the higher timeframe candle is currently trading relative to its open.
6. Use Premium / Discount zones to decide whether you are buying in discount or selling in premium.
---
### Tips & Best Practices
- Start with fewer features turned on. Too many lines/boxes can clutter the chart.
- Use the **Present** mode in SMC if you only want the most recent structure (cleaner look).
- The HTF PO3 candles are drawn to the **right** of the current bar — they are projections, not historical candles.
- ORB targets are measured moves based on the Opening Range width. Adjust the % to match the instrument’s typical volatility.
- The session MA only works properly on intraday timeframes (it resets at the start of the Opening Range).
---
### Alerts Available
All original SMC alerts are included:
- Internal / Swing BOS & CHoCH (bullish & bearish)
- Order Block breakouts
- Equal Highs / Lows
- Fair Value Gaps
You can set alerts on any of these from the TradingView alert menu. 指标

Breaker Block Identifier [algo_aakash]Breaker Block Identifier is a market structure indicator that converts failed order block retests into scored, non-repainting breaker zones. Rather than flagging every order block that gets invalidated, the script requires a complete sequence of confirmed price events — order block formation, an opposing structure break, a retracement into the invalidated zone, and a failed retest of that zone — before a breaker is created, and then ranks the result with a transparent quality score.
Problem Statement
Order blocks are frequently invalidated by a structure break and later retested, but a retest failing to continue in the original direction is not automatically a tradable breaker block. Many public scripts draw a zone as soon as an order block is broken, without verifying that the subsequent retest actually failed, how deep that retest penetrated, or how convincingly price rejected the zone. This produces a high volume of low-quality zones that require manual filtering by the trader.
This indicator addresses that gap by treating breaker formation as a multi-stage state machine rather than a single condition, and by scoring every candidate that completes the sequence so weak retests can be filtered out programmatically instead of visually.
Methodology
Swing highs and lows are identified with ta.pivothigh/ta.pivotlow using a user-defined bar count on each side, so every structural level referenced by the script is a confirmed pivot, never a forming one.
An order block source candle is located as the last opposite-colored candle at or immediately before each confirmed swing pivot, within a fixed lookback. The candle must exceed a minimum size expressed as a multiple of ATR, and can optionally be required to close on above-average volume. Zone boundaries can be set to the candle body (open/close) or the full wick range (high/low).
Every order block candidate then moves through three internal states. In the Pending state the script waits for an opposing structure break (a close beyond the relevant swing high or low, optionally required to clear the level by a minimum ATR multiple). Once that break occurs the candidate becomes Flipped, and the script waits for price to retrace back into the now-invalidated zone. On entry into the zone the candidate becomes Retesting, and the script tracks the deepest penetration price reaches inside the zone on a bar-by-bar basis.
A Retesting candidate resolves in one of two ways. If price closes back through the zone in its original direction by the confirmation displacement threshold, the retest is judged to have held and the candidate is discarded with no breaker created. If price instead closes through the opposite edge of the zone by the same displacement threshold, and the tracked penetration depth met a minimum percentage of the zone's height (the Retest Qualification Filter), the retest is judged to have failed and the order block is converted into a breaker in the opposite direction of its original bias.
Each confirmed breaker is then scored from 0 to 100 using six independent, user-weighted factors: the displacement strength of the invalidating structure break, the ATR-relative size of the original order block candle, how closely the retest penetration matched a user-defined ideal depth (scored on a curve, so both shallow touches and near-total breaches score lower than a clean mid-zone tag), the wick-rejection ratio of the confirming candle, how quickly the retest resolved relative to the retest window, and the ATR-normalized distance price traveled before returning to retest. The six sub-scores are combined using auto-normalized weights, so a breaker only appears on the chart, gets drawn, and triggers alerts if it clears the configured minimum quality threshold.
Confirmed breakers remain in an Active/Touched state until price closes through the far edge of the zone by the invalidation displacement threshold, at which point the zone is marked invalidated, visually dimmed, and removed after a configurable linger period. A hard maximum-age limit and a per-direction cap on active zone count prevent unbounded object growth.
Signal Workflow
Step 1 — a confirmed swing pivot forms and an order block candidate is registered from the qualifying source candle behind it.
Step 2 — the candidate waits in a Pending state until an opposing structure break (BOS/CHoCH) closes beyond the originating swing level.
Step 3 — once flipped, the candidate waits for price to re-enter the invalidated zone, entering the Retesting state and tracking maximum penetration depth.
Step 4 — the retest resolves: a displacement close back through the zone in the original direction discards the candidate, while a displacement close through the opposite edge with sufficient penetration confirms a breaker.
Step 5 — the confirmed breaker is scored across six weighted factors and only drawn, labeled, and alerted on if it meets the minimum quality threshold.
Step 6 — the active breaker zone extends forward until price closes through its far edge by the invalidation displacement threshold, at which point it dims and is scheduled for removal.
Why This Indicator Is Different
Most public order block or breaker scripts draw a zone the moment an order block is invalidated by a structure break, without separately validating whether the ensuing retest actually failed.
This script models breaker formation as an explicit four-state pipeline (source candle, pending, flipped, retesting) and only creates a zone after the retest resolves against its original direction with a minimum measured penetration depth.
The Breaker Quality Score converts six independently disclosed factors, including retest penetration depth scored on a curve around a configurable ideal value rather than a simple threshold, into a single adjustable ranking rather than a cosmetic label.
Quality-score weighting is fully exposed, allowing the ranking to be tuned toward structure strength, retest precision, wick rejection, confirmation speed, or impulse distance depending on the trader's approach.
Zone fill transparency scales with the quality score, so higher-ranked breakers render more opaque and lower-ranked ones fade into the background without adding separate visual elements.
An optional formation preview renders the retest phase of a candidate before it resolves, giving visibility into why a breaker did or did not form without permanently cluttering the chart.
Inputs
Structure Settings
Swing Pivot Length
Displacement Filter on Structure Break
Structure Break Displacement (x ATR)
ATR Length
Order Block Detection
Use Candle Body for Zone Boundaries
Min Order Block Size (x ATR)
Candidate Expiry (bars)
Volume Confirmation Filter
Volume MA Length
Volume Multiplier Threshold
Breaker Conversion Rules
Retest Window (bars)
Confirmation Displacement (x ATR)
Min Retest Penetration (%)
Quality Score
Filter Breakers by Quality Score
Minimum Quality Score
Ideal Retest Penetration Ratio
Advanced weight sliders for structure break strength, impulse size, retest precision, wick rejection, confirmation speed, and distance traveled
Visual Settings
Bullish/Bearish Breaker Colors
Min/Max Fill Transparency
Show Zone Midline
Show Quality Label
Label Size
Formation Preview toggle and color
Lifecycle & Cleanup
Max Active Breakers (per side)
Invalidation Displacement (x ATR)
Invalidated Linger (bars)
Max Breaker Age (bars)
Info Panel
Show Info Panel
Panel Position
Alerts
Alerts are available for:
Bullish Breaker Block formed
Bearish Breaker Block formed
Structure confirmation on breaker conversion
Price entering an active breaker zone
Breaker invalidated
Practical Usage
Use the info panel's structure bias reading as directional context before evaluating individual breaker zones.
Treat a fresh, high-quality breaker aligned with the prevailing structure bias as a potential continuation zone rather than a standalone entry signal.
Raise the minimum quality threshold on lower timeframes or noisy instruments to reduce the number of marginal zones drawn.
Use the retest penetration and displacement settings together to control how strict the failed-retest qualification is for your instrument and timeframe.
Combine the alert feed with a broader trade plan, since each alert marks a structural event, not an execution signal.
Limitations
Swing pivots require bars to form on both sides before they confirm, so structure breaks and order block placement are inherently delayed by the swing pivot length.
The order block source candle is located within a fixed lookback behind each pivot; if no qualifying candle exists in that window, no candidate is created for that pivot.
Quality scoring is a relative ranking based on disclosed, adjustable factors and does not predict the outcome of any individual breaker zone.
Volume-based filtering depends on the data provider's reported volume and may behave inconsistently on instruments with limited or unreliable volume data.
As with any structure-based tool, results will vary across instruments, timeframes, and market regimes.
Notes
This indicator is a market structure analysis tool intended to organize and rank breaker block formation through a disclosed, multi-stage validation process.
All structure breaks, state transitions, breaker confirmations, and invalidations are evaluated on confirmed bar closes only, so no element of the script repaints once drawn.
The output is intended to support structural analysis and is not a standalone buy or sell recommendation.
指标

Smart Money Concepts Liquidity Sweep, Order Block & FVGOVERVIEW
Every Smart Money indicator draws order blocks and tells you they work. This one scores them 0–100 and then forward-tests whether the score is actually true — on your instrument, on your timeframe.
It maps liquidity, detects stop-hunts, builds entry zones from the displacement that follows, confirms them with real order flow, and grades every zone that price returns to. Instead of "here is an order block, trust me", the panel tells you something like:
Tier-A zones returned +0.23R vs +0.08R for a matched control, n=61, t=2.1 — PROVEN
...or, just as usefully, NOT PROVEN. It is built to be able to tell you it doesn't work.
This is a research and framing tool. It is NOT a strategy, NOT a signal service, and NOT a validated edge.
WHY THESE PARTS ARE ONE TOOL (mashup rationale)
The Smart Money / ICT model is a SEQUENCE. Each step is meaningless on its own, and that is why they are combined here rather than sold as separate scripts:
1. LIQUIDITY POOLS — Stops cluster above equal highs (buy-side) and below equal lows (sell-side). Swing points within an ATR tolerance are clustered into a single pool; the more swings, the more stops resting there. A pool is not a signal. It is a magnet and a target.
2. THE SWEEP — Price wicks THROUGH the pool and closes back INSIDE it. That is a stop-hunt, and it is the only part of the sequence that reveals intent. A sweep alone is still not a trade.
3. DISPLACEMENT — An impulsive, ATR-normalised move away from the swept level. This is what separates a SWEEP (reversal) from a RUN (continuation).
4. THE ZONE — Displacement leaves footprints: a FAIR VALUE GAP (a three-bar imbalance) and an ORDER BLOCK (the last opposing candle before the impulse). Where an FVG sits INSIDE an order block, two independent structures agree — flagged as a confluence zone.
5. LOCATION — The zone is then judged on WHERE it sits. Against the VOLUME PROFILE (value area, point of control, and untested "naked" POCs), and against the DEALING-RANGE EQUILIBRIUM. A bullish zone in DISCOUNT is a zone you are being paid to buy; the same zone in premium is not.
6. ORDER FLOW — The question structure cannot answer: did anyone actually show up? Intrabar delta signs each lower-timeframe bar's volume by its own direction. A bullish zone born on NEGATIVE delta is a vacuum, not a footprint — and scores nothing for it.
7. THE ENTRY — Price is never chased. The engine arms only when price RETRACES into a fresh zone, then frames entry / stop / target — the target being THE NEXT OPPOSING POOL OF STOPS, because that is where the next batch of liquidity is resting.
8. THE CALIBRATION — Without it, everything above is folklore.
Remove any one of these and the tool marks noise, chases price, targets nothing, ignores where value actually is, or reports a confidence it has not earned.
THE SCORE (0–100, eight measurable components, no discretion)
Displacement strength ...... impulse body ÷ ATR — the energy behind the zone
Participation (RVOL) ....... volume at formation vs its own recent average
Born from a sweep .......... did a stop-hunt precede it? (the core ICT claim)
Imbalance size ............. FVG height ÷ ATR
HTF alignment .............. does the higher timeframe agree?
Premium / discount ......... bullish zone in DISCOUNT? bearish zone in PREMIUM?
Volume-profile location .... at value, at the POC, or at an untested POC?
Order flow (delta) ......... was the displacement backed by real aggressive flow?
Tiers: A (70+) · B (40–69) · C (below 40). Every weight is an input — if you think the sweep matters more than I do, turn it up, and let the calibration tell you whether you were right.
THE CALIBRATION — AND WHY IT IS HONEST
Every zone trade is paired with a MATCHED CONTROL: the same bar, the same direction, and the SAME R:R — but entered at market with an ATR stop instead of at the zone. This isolates exactly one variable: does entering AT THE ZONE beat entering anywhere else on identical geometry? Under a random walk, this control has zero expectancy, so anything the zones earn is real.
Each tier is tested against its OWN control, because an A-zone may carry a very different R:R from a C-zone, and a trade's hit rate depends on its R:R.
Results are reported as EXPECTANCY IN R, not hit rate. When R:R varies from trade to trade, a hit rate on its own is meaningless: a 6R winner at 20% is +0.4R (excellent), while a 1R winner at 55% is +0.1R (barely worth the commission).
A Welch t-test decides whether the difference is real or luck. The panel does not say "proven" unless t > 1.96.
The panel also answers the one question that matters most: DOES TIER A BEAT TIER C? If the scoring model has any value, A-grade zones must outperform C-grade zones. If they don't, the score is noise — and it will say so.
Conventions are deliberately chosen so the tool cannot flatter itself:
· Both barriers touched on the same bar → the STOP is assumed first.
· Expired trades are marked to market, not counted as wins or losses.
· Everything is logged and resolved on confirmed bars only.
HOW TO USE IT
1. Read the bias, the liquidity map, and the premium/discount shading. Pools above are buy-side, pools below are sell-side, and price usually travels from one to the other.
2. Wait for a SWEEP, then for a zone to be created by the displacement that follows.
3. Do NOT chase. The engine arms an entry only when price RETRACES into a fresh zone.
4. Watch for ABSORPTION at the zone — heavy volume, a small range, price holding. Someone is soaking up the aggression. That is a defended zone, and it is the best live confirmation available.
5. READ THE CALIBRATION BEFORE YOU WEIGHT ANY OF IT. If Tier A is not proven on your instrument and timeframe, a zone is a LOCATION, not a PROBABILITY — treat it as context only.
6. Entry / stop / target and the resulting R:R are drawn on the chart. They are arithmetic, not advice.
Do not tune the weights until the numbers turn green. That is curve-fitting, and the calibration exists to catch it — not to be defeated by it.
ORIGINALITY
The underlying SMC concepts are public and credited below. What is assembled here is the specific synthesis: an eight-component measurable score, the fusion of SMC structure with auction-theory location (volume profile and premium/discount), true intrabar order-flow confirmation, a per-tier matched control, expectancy-in-R reporting, and a significance test that can — and frequently does — return "not proven".
Clean-room implementation. No third-party Pine code is reused.
UNIVERSAL / DATA REQUIREMENTS
Works on any symbol and any timeframe — the engine is ATR-normalised throughout, so it adapts to the instrument rather than assuming point values.
Volume improves the score but is NOT required. On a symbol without real volume, the RVOL, volume-profile and order-flow components neutralise and the panel says so, rather than blanking or pretending.
Intrabar delta requires a timeframe strictly below the chart's. The script AUTO-MAPS this (1m→5s, 3m→15s, 5m→30s, 15m→1m, and so on) because if the intrabar timeframe equals the chart timeframe there is only ONE intrabar — the bar itself — and delta degenerates to ±100% on every bar. Where true intrabar data is unavailable, the script falls back to a close-location proxy AND LABELS IT AS A PROXY in the panel.
NON-REPAINTING
Pools, sweeps, displacement, zones, the volume profile, absorption and entries are ALL computed on confirmed bars only.
Swing points use ta.pivot* and are therefore known only AFTER their confirmation bars. This is why a liquidity pool appears a few bars after its swing. That delay is the honest cost of not repainting, and it is paid deliberately — a level that moves after the fact is worse than no level at all.
The higher-timeframe read uses lookahead_off with a live-bar offset. The calibration harness logs AND resolves on confirmed bars, so its statistics cannot inflate intrabar. Nothing here is drawn and then moved.
HONEST LIMITATIONS — PLEASE READ
Smart Money Concepts is a popular framework, not a proven one. That is precisely why this script measures it instead of asserting it.
The calibration figures are IN-SAMPLE, close-to-close, with NO costs or slippage, and they use overlapping windows. A proven in-sample edge is NOT a guarantee of out-of-sample results.
The rolling volume profile is an APPROXIMATION — each bar's volume is spread uniformly across the bins its range covers. It is not tick data.
Small samples are unreliable. A tier with a low "n" is provisional even if it looks good.
If the edge is near zero, negative, or unstable across timeframes, the honest conclusion is that this model carries no edge on that instrument. The tool is designed to be able to tell you that, and you should believe it when it does.
Nothing here predicts price.
CONCEPT CREDITS
Smart Money / ICT concepts — liquidity pools, stop-hunts, displacement, fair value gaps, order blocks, premium/discount and optimal trade entry — are public trading concepts popularised by Michael J. Huddleston (Inner Circle Trader) and the wider SMC community.
Market Profile, the point of control and the value area — J. Peter Steidlmayer and the CBOT.
Market structure theory — Charles Dow.
Average True Range — J. Welles Wilder.
Wilson score interval — Edwin B. Wilson.
Triple-barrier forward labelling — Marcos López de Prado.
Welch's t-test — B. L. Welch.
The zone-scoring model, the order-flow fusion, the per-tier matched control and the tier calibration are the author's own. Not affiliated with, nor endorsed by, any of the above.
DISCLAIMER
This is a research and educational tool only. It is NOT financial advice, NOT a recommendation, and offers NO guarantee of profitability or accuracy. Indicators describe past behaviour; they do not predict the future. Entry, stop and target output is arithmetic, not advice. Trading carries a risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use of this script. 指标

Liquidity Divergence OscillatorOverview
Liquidity Divergence Oscillator is a distribution / absorption detector. It estimates liquidity health from Kyle's lambda — the price impact per unit of signed volume — and reads it for divergence against price. When price grinds to a higher high while liquidity health makes a lower high, large participants are often unloading size into strength (a distribution footprint); the mirror — price lower low, health higher low — is absorption. A forward-calibration harness scores whether those price/liquidity divergences have actually followed through on your instrument. It is a flow-structure read, not a signal to trade alone.
Why it is different — not another CVD/volume oscillator
CVD, the A/D line and MFI all measure the direction and amount of flow — who is buying or selling. Kyle's lambda measures something orthogonal: how much price moves per unit of that flow — the depth and fragility of the book. Price pushing to new highs while lambda quietly rises (liquidity thinning) is the classic footprint of size being distributed into strength, and no direction-only flow tool sees it. That impact axis is what makes a liquidity divergence its own, independent read — and it's why this belongs alongside your CVD tools rather than duplicating them. It's also distinct from a liquidity map: this is a standalone divergence oscillator, built to surface the turn, not to chart the shelves.
How the parts work as one tool
Signed volume — sv = volume × sign(price change), a tick-rule aggressor proxy.
Kyle's lambda — Cov(ΔP, sv) / Var(sv) over a rolling window: the regression slope of price change on signed flow, the standard lambda estimator. High = thin/stressed book, low = deep/liquid.
Liquidity health — −z(lambda), smoothed and tanh-squashed to a soft ±100 pane so "liquid vs stressed" reads on a fixed, self-scaling axis (0 = balance, ±50 ≈ a 1.6σ stretch).
Divergence — regular and hidden, from confirmed price pivots against health at those pivots.
Calibration harness — each regular divergence is queued and resolved a fixed horizon later against the unconditional base rate, reporting Hit / Edge / sample and a Wilson-gated star. A divergence class that never beats the base rate here is adding no information — and the dashboard shows that instead of assuming it.
How to use it
Read the oscillator's side and slope — above 0 is liquidity firming, below 0 is liquidity stressed. Treat a divergence mark as context (a distribution or absorption warning), never a standalone entry. Before you weight it, check the dashboard: if the Bull/Bear Edge isn't clearly positive with an adequate sample and a star, that class isn't carrying an edge on this instrument. Signals are marked in the pane and, optionally, on the price chart. Combine with your own levels, trend and risk rules — it describes behaviour; it decides nothing.
Universal & non-repainting
High/Low/Price are inputs, so the divergence engine runs on any series; the lambda estimate needs real volume, so use the futures (a cash index reads "no volume"). Pivots confirm a fixed number of bars after the fact and don't move once printed, and the calibration harness logs and resolves only on confirmed bars, so its statistics never repaint intrabar. The live oscillator updates each bar like any oscillator. Edge figures are in-sample, forward-measured at a fixed horizon, with no costs — a study aid, not a backtest.
Originality
Kyle's lambda and price/oscillator divergence are public; the Wilson interval is Edwin B. Wilson's. What's original is the specific construction: the detrend → z-score → tanh-squash liquidity-health oscillator built off the lambda estimate, the combined regular+hidden divergence engine keyed to it, and the forward-calibration harness that scores each divergence class against its base rate. Clean-room implementation; no third-party Pine code reused.
Concept credits
Price impact / lambda — Albert S. Kyle (1985)
Tick-rule aggressor signing — after the classic trade-sign literature (Lee & Ready)
Wilson score confidence interval — Edwin B. Wilson
Price/oscillator divergence — standard public technical-analysis technique
Disclaimer
Educational / informational only. Not financial advice, not a signal, not a recommendation. The lambda estimate uses tick-rule signed volume — a proxy, not the true tape — so liquidity health is an inference, not an order-book reading. Edge figures are in-sample, forward-measured with no costs. Past behaviour does not assure future behaviour. Markets carry risk. Do your own research and paper-trade before risking capital; you alone are responsible for your decisions.
指标

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. 指标

Order Flow Criticality Hawkes Branching RatioOrder-Flow Criticality — Hawkes Branching Ratio
What it is
Most order-flow tools ask how strong flow is. This one asks how fragile it is — how close the tape is to a self-sustaining cascade, where each burst of aggressive flow tends to trigger the next. That property is the branching ratio (n) of a self-exciting (Hawkes) process: n ≈ 0 means bursts are independent and the tape is stable (exogenous); n → 1 means flow is nearly self-sustaining — endogenous, reflexive, fragile. The output is a state read that says size down as criticality rises. It never issues a buy or sell.
How it works (and why this method)
Event — a bar whose absolute signed volume-delta is unusually large for its time of day. Delta is built from finest-available lower-timeframe signed volume, with an automatic bar-shape fallback.
Branching ratio — fitting a Hawkes kernel by maximum likelihood is heavy and fragile, so this uses the model-independent moment estimator of Hardiman & Bouchaud (2014): for a self-exciting process the variance-to-mean ratio of the event count (the Fano factor) grows as 1/(1−n)², so n ≈ 1 − √(mean_count / var_count) over recent non-overlapping counting bins. Only a mean and a variance of counts are needed. A random (Poisson) tape gives n ≈ 0; a clustered tape gives n → 1.
De-seasonalization (the key honesty step) — this estimator is known to be biased upward by intraday seasonality: opens and closes have naturally higher flow, which can masquerade as criticality (a Poisson process with a changing rate can show a spurious n ≈ 1). So an event is judged against the typical flow for its hour, removing the daily rhythm so what remains is genuine self-excitation.
Output — a background tint that intensifies as n rises, ● event marks, a SIZE-DOWN tag on crossing the critical zone, and a dashboard stating STABLE / ELEVATED / CRITICAL with a suggested size factor (1 − n).
Everything advances only on confirmed bars; the lower-timeframe delta is read on closed bars. No hindsight.
The stability & multi-timeframe layer
States are dwell-filtered (standard anti-chattering): a new STABLE/ELEVATED/CRITICAL is announced only after surviving a set number of confirmed bars. STABILITY shows how settled the read is; PENDING shows a forming state with a countdown. Cost: a few bars of lag — stated and adjustable.
The criticality lane — a thin strip at the pane bottom — gives the glance-read: green = stable, amber = elevated, red = critical. Risk colors (safe/danger), never direction.
The HTF STACK row shows the raw criticality state on three higher timeframes derived as multiples of the chart (defaults 3×, 5×, 15×). Honesty notes: the HTF slots use the bar-shape delta proxy (lower-timeframe data cannot be nested inside a higher-timeframe request) and the global flow baseline instead of the hourly profile (an HTF bar spans multiple hours, so per-hour bucketing is ill-defined there). ✓ = every timeframe agrees; ⚠ = a higher timeframe is CRITICAL while the chart is not — fragility above your resolution.
Seeing the cascades
Every flow burst prints a dot below its own bar: blue = isolated (arrived independently), warm = chained (within a few bars of the previous burst — likely triggered by it). This is the branching ratio made visible: as the tape approaches critical you can watch chains lengthen at the price action itself.
The EVENTS row shows the recent % chained — the plain-language twin of n — and the branching-ratio row carries a fill gauge so the number reads like a fuel gauge.
How to use it
Add to any liquid symbol/timeframe; defaults suit index futures — change the volume source and lower-timeframe for other markets.
Read the dashboard headline: STABLE / ELEVATED / CRITICAL. As it rises toward CRITICAL, the branching ratio is telling you the tape is increasingly self-referential and prone to cascades.
Use it as a risk overlay on top of your directional tools: when criticality is high, cut size, widen stops, or stand aside — regardless of which way you lean. When it's low and stable, normal sizing is more justified.
Keep de-seasonalization on (default). Turning it off will make opens and closes look critical when they may just be busy.
What makes it original
Retail order-flow tools measure intensity and call it strength. This measures endogeneity — the degree to which flow is feeding on itself — using a published market-reflexivity statistic, computed by a moment estimator that is feasible on a chart, and de-seasonalized so it isn't fooled by the daily rhythm (the exact bias the literature warns about). Reframing order flow from "how strong" to "how fragile," as an explicit size-down gauge, is the contribution.
Concept credits
Self-exciting point processes — A. G. Hawkes (1971). Reflexivity / branching ratio as market endogeneity and flash-crash analysis — V. Filimonov & D. Sornette. Moment (mean/variance) branching-ratio estimator — S. Hardiman & J.-P. Bouchaud (2014). Hawkes models of order flow — E. Bacry, J.-F. Muzy and co-authors. Implementation and charting design are the author's own.
Important disclaimer
Research and education only. Not financial advice, not a signal service, not a guarantee of future results. The branching ratio is a descriptive statistic and a proxy — not a certainty and not a direction. High criticality does not predict which way price will move, only that flow is fragile. Validate independently and manage your own risk. 指标

Levy Area Flow Sequencer Flow Price Lead LagLévy-Area Flow Sequencer — Flow/Price Lead-Lag
What it is
Correlation says flow and price move together; it cannot say which moves first. But the sequencing is the interesting part: when aggressive flow precedes price, moves are being built by participation before they print; when price precedes flow, price is running ahead and flow is chasing — squeeze / stop-run character. Traced together, the two series form a path in the plane, and the signed (Lévy) area that path encloses measures its rotation — a scale-free, lag-free read of lead–lag, including non-linear lead–lag that fixed-lag cross-correlation misses. This is the most experimental tool of this suite, and it is framed that way.
The mathematics (signature lead–lag metric)
The metric is the antisymmetric part of the second-level path signature of the pair (flow, price): the window sum of (X·dy − Y·dx), with both increment series normalized to unit scale so the area is dimensionless. Per the literature's interpretation, the metric is positive and grows when moves in the first series are followed by same-direction moves in the second. The first series here is cumulative order-flow delta (from lower-timeframe signed volume, with bar-shape fallback) and the second is price, so AREA > 0 → FLOW LEADS and AREA < 0 → PRICE LEADS.
The honesty steps
Significance gate — a raw signed area is noisy, so the reading is ranked against its own recent history, and a lead is declared only when rotation is unusually strong for this symbol/timeframe. Otherwise the state is BALANCED: no claim.
Sequencing ≠ causation — the literature is explicit that a signed area alone cannot establish causal direction. This tool reports a temporal-ordering tendency of past bars; treat it as tape character.
Known limitation, stated — persistent inverse co-movement between flow and price can contaminate the sign. On liquid futures they co-move and the read behaves; on instruments where they reliably anti-correlate, don't trust it.
The stability & multi-timeframe layer
States are dwell-filtered (standard anti-chattering): FLOW LEADS / PRICE LEADS / BALANCED is announced only after surviving a set number of confirmed bars, so the read doesn't flip-flop. STABILITY shows how settled it is; PENDING shows a forming state with a countdown. Cost: a few bars of lag — stated and adjustable.
The lead lane — a thin strip at the pane bottom — gives the glance-read: green = flow leads (moves better backed), amber = price leads (flow chasing, be sceptical), gray = balanced. Trust/caution colors, never direction.
The HTF STACK row shows the raw lead state on three higher timeframes derived as multiples of the chart (defaults 3×, 5×, 15×). Honesty note: lower-timeframe data cannot be requested inside a higher-timeframe request, so the HTF slots use the bar-shape delta proxy — a stated approximation. ✓ = all timeframes agree on the same significant lead; ⚠ = a higher timeframe shows the opposite lead.
How to use it
Add to a liquid intraday chart. Read the dashboard: FLOW LEADS → breakouts/drives carry more weight (participation came first); PRICE LEADS → be sceptical of extensions (flow is chasing); BALANCED → the tool makes no claim.
Tags print when the lead flips while significant; alerts fire on flips.
Use it as context alongside order-flow and structure tools — never as a standalone signal.
What makes it original
Path-signature methods are frontier quantitative machinery (rough-path theory) that has reached systematic trading but, to the author's knowledge, not chart platforms. Applying the signature lead-lag metric to the flow-vs-price pair — the pair an order-flow trader actually cares about — with an honest significance gate and stated limitations, is the contribution.
Concept credits
Signed area of stochastic paths — P. Lévy. Rough-path / signature theory — T. Lyons; Levin, Lyons & Ni (2016). Signature lead-lag metric and interpretation — I. Chevyrev & A. Kormilitzin (2016). Market applications — Bennett, Cucuringu & Reinert (2022); Cartea, Cucuringu & Jin (2023). Implementation and charting design are the author's own.
Important disclaimer
Research and education only. Not financial advice, not a signal service, not a guarantee of future results. The area measures a sequencing tendency in past data; it is not causal proof and not a prediction. Validate independently and manage your own risk. 指标

Adaptive Market Suite [Jayadev Rana]Overview
Adaptive Market Suite is a four-module analysis toolkit that draws on the price chart. Each module is independent: turn any of them on or off, and each has its own settings group. It shows context, not buy or sell arrows. The four modules are an adaptive trend, volatility bands, market structure with order blocks and fair-value gaps, and an order-flow oscillator. You read the confluence and make your own decisions.
Module 1 - Adaptive Trend and Regime
A moving average whose smoothing adapts to Kaufman's efficiency ratio: the net distance price travelled divided by the total path it took to get there. In clean trends the ratio is high and the average speeds up to hug price; in chop it is low and the average slows and flattens. The line is coloured by its slope, and the info panel reports whether the market is trending or ranging from the same ratio.
Module 2 - Expected-Move Bands
Volatility bands around the adaptive basis. Instead of a fixed multiple of range, the band width scales with where the current Average True Range sits in its own recent history (its percentile), so the bands contract in quiet conditions and expand when volatility rises. A nearer pair and a wider pair mark two envelopes.
Module 3 - Liquidity and Structure
Market structure from confirmed swing pivots, labelled as Break of Structure and Change of Character. Because the pivots are symmetric (confirmed on both sides), they are fixed before they are drawn and do not repaint afterward. On a structure break the tool marks the order block behind the move (the last opposite-direction candle before the push) and it tracks fair-value gaps, which are three-bar imbalances. Each zone follows a mitigation lifecycle: it is extended while it is live and greyed once price trades through it, and only the most recent zones per type are kept so the chart stays readable.
Module 4 - Order-Flow Oscillator
A normalised buy and sell pressure read in the indicator pane. For each bar it combines where price closed within the bar's range with how large that bar's volume was relative to its recent average. Sustained closes near the highs on strong volume push the oscillator positive; the mirror pushes it negative. An absorption marker highlights bars with heavy volume but a small range, where effort is not producing movement.
Info panel
An optional compact table summarises the current trend direction, the regime read, the volatility percentile, and the current order-flow side. It is context only.
Inputs
Inputs are grouped per module: General (ATR length); Module 1 (efficiency length, fast and slow smoothing, regime threshold, colours); Module 2 (volatility lookback, base and extra width, colour); Module 3 (swing length, order-block lookback, max zones per type, toggles for structure, order blocks and fair-value gaps, colours); Module 4 (pressure smoothing, absorption threshold, colours); plus an info-panel toggle. Every module has a single enable switch.
Alerts
Bullish and bearish structure break, and the order-flow oscillator crossing above or below zero.
How to use it
Treat it as a confluence map rather than a signal. For example, price reaching an order block near the lower band, with the order-flow oscillator turning up while the adaptive trend is still rising, is a stronger context than any one of those alone. Turn off the modules you do not need: if you only trade structure, disable the other three groups for a clean map. It is intended for liquid instruments and works across timeframes; the demonstration chart is Gold on the 1-hour timeframe.
Limitations
The structure module confirms swings with bars on both sides, so its labels and order blocks appear a fixed number of bars after the pivot forms. That delay is the trade-off that keeps them from repainting. The bands, the oscillator and the info panel read the current bar and update as it forms, like any live calculation. This is an analysis tool, not a strategy: it places no orders, makes no performance claim, and there is no win rate because it does not promise trades.
Disclaimer
For education and research only. This is not financial advice, and past chart behaviour does not predict future results. Test any approach yourself and manage your own risk. 指标

Fragility-Weighted Liquidity Map Kyle Amihud RollFragility-Weighted Liquidity Map — Kyle · Amihud · Roll
What it is
A move of the same size means opposite things depending on the book beneath it. Into a thin book, a move is mostly price impact — mechanical, fragile, prone to snap back. Into a deep book, the same move took real participation and is more likely informed. This tool estimates how impact-driven the tape is right now from three classic microstructure measures, fuses them into one fragility read, and tints recent liquidity levels by it. It scales conviction and risk — it never picks a direction.
The three measures (all from OHLCV, peer-reviewed)
Kyle's lambda (Kyle 1985) — price impact per unit of signed volume: |price change over a window| ÷ |Σ sign(Δclose)·volume|. High λ = each unit of flow moves price a lot = thin, impactable.
Amihud illiquidity (Amihud 2002) — the average of |return| ÷ dollar-volume. High = small volume moves price a lot. (Empirically ~0.8 correlated with Kyle, so the two are blended, not double-counted.)
Roll implied spread (Roll 1984) — the effective spread implied by the bid-ask bounce: c = 2·√(−Cov(Δp, Δp₋₁)) when that covariance is negative. When it is positive — common in trends — the Roll model does not apply, so the estimate is shown as not measurable here rather than forced to a number. That honesty is deliberate.
Fusion → fragility
Each measure is ranked against its own recent history (a percentile), so the read self-tunes to the symbol and timeframe. The fragility index is the weighted blend of whichever measures are currently available (Roll drops out in trends, and the blend adapts). High fragility = impact-driven, reversible tape; low = deep, informed. A plain-language read suggests trusting breakouts less and fades more when fragility is high — as context, not a signal.
The map
Bars that trade unusually large volume leave a horizontal liquidity level where size changed hands. Each level is tinted by the fragility state at the moment it formed: warm = it printed in a thin/impact-driven tape (a weaker level, more likely to be swept); cool = it printed in a deep/informed tape (sturdier). So the map shows not just where liquidity sits but how trustworthy each pocket is.
How to use it
Add to any liquid symbol/timeframe; defaults suit index futures — change the price/volume sources for other markets.
Glance at the fragility lane — the thin strip at the pane bottom: red = thin/fragile, green = deep/solid, gray = normal. Risk-semantic colors (danger/safe), never direction. That strip alone answers "how careful should I be" for a non-technical user.
States are dwell-filtered (standard anti-chattering): a new THIN/DEEP/NORMAL is announced only after surviving a set number of bars, so the read doesn't flip-flop. STABILITY shows how settled it is; PENDING shows a forming state with a countdown. The cost is a few bars of lag — stated and adjustable.
The HTF STACK row shows the raw fragility state on three higher timeframes derived as multiples of the chart (defaults 3×, 5×, 15× — a 5m chart reads 15m/25m/75m automatically). ✓ green = all timeframes agree on the same actionable state; ⚠ amber = a higher timeframe reads the opposite state.
Read the dashboard: DEEP / NORMAL / THIN, the three measures' ranks, and a suggested size factor. As it turns THIN, treat moves as more reversible: size down, favour fades over breakout-chasing.
Use the rails as liquidity references coloured by trust — a warm rail formed in fragile conditions; a cool rail in solid ones.
Pairs with Order-Flow Criticality: that tool asks whether flow is self-exciting (endogenous); this asks whether the book is thin (impactable). Both elevated together is the genuinely fragile state.
What makes it original
Retail liquidity tools draw where volume traded. This one weights each level and the whole tape by how impactable it is, using three peer-reviewed microstructure estimators computed from bar data, self-calibrated, and — crucially — honest about when the Roll model doesn't apply. Reframing a liquidity map from "where is liquidity" to "how fragile is liquidity" is the contribution.
Concept credits
Price impact of order flow (lambda) — A. S. Kyle (1985). Illiquidity ratio — Y. Amihud (2002). Implied effective spread from serial covariance — R. Roll (1984). Square-root impact refinement — J. Hasbrouck. Fragility framing — general market-microstructure literature. Implementation and charting design are the author's own.
Important disclaimer
Research and education only. Not financial advice, not a signal service, not a guarantee of future results. These are proxies estimated from bar data, not order-book truth, and they do not predict direction. Validate independently and manage your own risk. 指标

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. 指标

Order Blocks with Volume [Quantum Algo]Order Blocks with Volume
OVERVIEW
This indicator finds order blocks — the candles where a directional move originated before price broke market structure — and measures the buy and sell volume that traded inside each one. Every zone is drawn as a box that extends forward until price returns to it, and each active zone is labelled with its total volume and its buy/sell split, so you can tell at a glance which blocks were built on heavy participation and which were not.
It is built entirely from price and volume on the chart you apply it to. There is no repainting of confirmed zones: detection runs only on closed bars.
HOW DETECTION WORKS
1. Market structure. Confirmed swing highs and swing lows are located using a pivot of configurable length (Swing Length). A larger value isolates more significant structure and produces fewer, larger zones.
2. Break of structure. When a candle closes above the most recent confirmed swing high (bullish) or below the most recent confirmed swing low (bearish), the indicator treats it as a break of structure and looks for the order block that produced the move.
3. The order block candle. Starting from the breakout, the script steps back over the impulse candles and marks the last opposite-close candle before the move began — the last down-close candle for a bullish block, the last up-close candle for a bearish block. This is the origin of the displacement and the level price often revisits.
4. Zone range. The block is drawn from that candle using either its full high-to-low range (Wick) or its open-to-close body (Body).
VOLUME ENGINE
For each order block candle the indicator estimates how much of the traded volume was buying versus selling, using where the candle closed within its own range:
- Buy volume is weighted by how close the candle closed to its high.
- Sell volume is weighted by how close it closed to its low.
This split is shown two ways:
- Buy / Sell volume bars: two horizontal bars anchored at the left of the zone — buy on the top half, sell on the bottom half — with lengths proportional to each side. The Volume Bar Length setting controls how long they can extend (they are automatically kept inside the zone).
- Volume label: written inside the zone on the right edge, showing the total volume of the block and the buy% / sell% balance.
Volume strength is the block's volume divided by the average volume over a configurable baseline (Volume Baseline Length). It is used by the optional filter below to keep only the heaviest blocks.
ZONE LIFECYCLE
- Active. A live zone extends to the current bar and shows its volume bars and label.
- Mitigation. When price first trades back into a zone, the 50% line marks the equilibrium and an alert can fire.
- Invalidation. A zone is invalidated when price moves through its far edge. The source can be a wick touch or a candle close (Invalidation Source).
- Breaker. If "Flip Broken Zones to Breaker Blocks" is on, an invalidated zone is kept and re-coloured as a breaker, since broken support can act as resistance and vice versa.
- Historic. If "Keep Invalidated Zones (Historic)" is on, finished zones are frozen at the bar they died, re-coloured neutral, and their volume bars and text are removed to keep the chart clean.
- If neither option is on, invalidated zones are removed.
To avoid clutter the indicator will not stack a new zone on top of an existing active zone in the same area, limits the number of active zones per side, and automatically drops any zone older than the drawing range.
ON-CHART ELEMENTS
- Coloured boxes: bullish and bearish order blocks (and a neutral colour for breaker/historic).
- Two inner bars per active zone: buy (top) and sell (bottom) volume.
- A dotted line through the middle of active zones: the 50% mitigation / equilibrium level.
- Text inside active zones: total volume and buy% / sell%.
SETTINGS
Structure & Detection
- Swing Length — pivot length used to define structure. Higher = larger, more significant zones.
- Impulse Lookback (bars) — how far back to search for the origin candle after a break of structure.
- Zone Range — Wick (full range) or Body (open-to-close).
- Max Active Zones / Side — cap on simultaneously active zones per direction.
Invalidation
- Invalidation Source — Wick (a high/low piercing the zone) or Close (a candle closing beyond it).
- Flip Broken Zones to Breaker Blocks — keep and re-colour broken zones as breakers.
- Keep Invalidated Zones (Historic) — freeze finished zones instead of deleting them.
Volume Engine
- Show Volume Label — write volume and buy/sell% inside active zones.
- Show Buy / Sell Volume Bars — draw the proportional buy/sell bars.
- Volume Baseline Length — averaging length used to rate volume strength.
- Volume Bar Length (bars) — maximum length of the buy/sell bars.
Filters
- Only Show High-Volume Zones — hide blocks below the strength threshold.
- Min Volume Strength (x avg) — threshold as a multiple of average volume.
- Filter Oversized Zones — skip blocks taller than the ATR limit.
- Max Zone Height (ATR x) — the height limit, in multiples of ATR.
Style
- Bullish Zone, Bearish Zone, Buy Volume, Sell Volume, Breaker / Historic, Text — colours.
- Zone Extension (bars) — how far active zones project past the current bar.
- Show 50% Mitigation Line — toggle the equilibrium line.
ALERTS
Alerts are raised through the alert() function for two events: an order block being tapped (mitigation) and an order block being broken (breaker formed). To use them, create an alert on the indicator and choose the "Any alert() function call" condition.
HOW TO USE
Order blocks mark areas where significant orders were likely placed. Traders commonly watch for price to return to an un-mitigated block and react there, and use the buy/sell volume split and strength to judge how meaningful a block is — a block built on high, one-sided volume is generally treated as more significant than a thin one. Combine the zones with your own confirmation and risk management; this tool highlights levels, it does not generate buy or sell signals.
DISCLAIMER
Nothing here is financial advice or a guarantee of any outcome. Past behaviour of price around order blocks does not predict future results. Always do your own research and manage risk. 指标

Power Order Blocks [ChartPrime]🔶 OVERVIEW
Power Order Blocks is an advanced structural detection engine designed to identify high-probability supply and demand zones. Unlike standard order block indicators, this tool focuses on "Power" — the intensity of the displacement following the block's formation, combined with a live information panel, equilibrium mapping, and touch tracking built directly into each zone.
It identifies the specific candle where institutional participants likely placed large orders, marks the resulting price inefficiency, and tracks these zones in real time until they are either mitigated or invalidated.
🔶 CORE CONCEPT — THE DISPLACEMENT VALIDATOR
The foundation of a "Power" Order Block is the displacement that follows it. For a zone to be considered valid, the market must move away from it with significant force.
The script uses a Displacement Multiplier to ensure quality:
• It compares the size of the engulfing candle to the previous candle's range.
• If the breakout candle isn't large enough relative to the setup candle, the zone is ignored.
• This filters out low-conviction market noise and focuses on areas of true institutional sponsorship.
🔶 THE POWER RATING SYSTEM
Every detected block is assigned a "Power" percentage. This rating provides immediate context regarding the strength of the move that created the zone.
• Calculation: The indicator compares the current displacement candle against the largest candle observed over a 100-bar lookback .
• Meaning: A 100% Power rating indicates the strongest displacement seen in recent history, suggesting a massive imbalance between buyers and sellers.
• Visual Intensity: When Power Intensity is enabled, the fill color of each block becomes more vivid as its Power % increases. High-power zones are immediately visible at a glance — weaker zones fade into the background naturally.
This allows traders to prioritize "High Power" zones, which typically offer more significant structural support or resistance.
🔶 DYNAMIC ZONE MANAGEMENT
The indicator manages zones dynamically to keep the chart clean and relevant:
Bullish Order Blocks (Demand): Formed when a bearish candle is followed by a high-displacement bullish candle. The zone is invalidated if price closes below the bottom of the block.
Bearish Order Blocks (Supply): Formed when a bullish candle is followed by a high-displacement bearish candle. The zone is invalidated if price closes above the top of the block.
Overlapping Cleanup: If a new order block forms that significantly overlaps an existing one, the script automatically removes the older, redundant zone to prevent clutter.
Block Limit: A maximum of 10 active blocks per side are tracked at any time, ensuring chart performance remains clean.
🔶 THE INFO PANEL
Each active Order Block renders a dedicated Info Panel — a secondary box that floats at the right edge of the zone and updates in real time.
The panel displays:
• Zone Direction: "Bullish OB" or "Bearish OB"
• Power %: The relative displacement strength at the time of formation
• Touch Counter: How many times price has tapped the zone boundary without breaking it
The touch counter is particularly valuable — a zone that has been tested multiple times without breaking demonstrates strong institutional defense and may represent a higher-conviction setup.
🔶 EQUILIBRIUM LINE
When Show Equilibrium Line is enabled, a line is drawn at the exact midpoint (50% level) of each Order Block.
• This level represents the theoretical "fair value" within the zone.
• Price often reacts precisely at the equilibrium before continuing in the original direction.
• It provides a refined entry reference within a wider zone, improving risk-to-reward on entries.
🔶 RETEST SIGNALS (MITIGATION)
When Show Retest Labels is enabled, the script monitors active zones for price interaction.
• If price returns to touch the boundary of a Bullish OB without breaking it, an upward arrow ⇡ appears below the bar.
• If price returns to touch the boundary of a Bearish OB without breaking it, a downward arrow ⇣ appears above the bar.
• A minimum 10-bar cooldown between signals prevents label spam on extended zone interactions.
• Each confirmed retest also increments the Touch Counter inside the Info Panel.
🔶 VISUAL ELEMENTS
Main OB Body: A filled rectangle spanning the order block's price range, extending forward in time. Fill intensity reflects the Power % when Power Intensity is enabled.
Info Panel: A secondary box at the right edge of each zone displaying Power % and Touch Count, updated live.
Equilibrium Line: A midpoint line inside each block marking the 50% level of the zone.
Retest Arrows: Clean arrow labels (⇡ / ⇣) marking the first tap into an active zone.
Color Coding: Fully customizable colors for Bullish (Demand) and Bearish (Supply) zones.
🔶 HOW TO USE
Entry Zones: Wait for price to return to a high-power zone. The Retest Arrow confirms the touch. Consider entries near the equilibrium line for tighter stops.
Zone Prioritization: Use the Power % to filter setups. Zones rated 70%+ represent the strongest institutional imbalances and are generally more reliable.
Touch Count Context: A zone with 0 touches is fresh and untested — typically the highest probability. Zones with multiple touches may be weakening.
Trend Confirmation: In a healthy trend, the market should consistently create and respect Power Order Blocks in the direction of the trend.
Stop Loss Placement: Order blocks provide logical structural levels for stops — just below a Bullish OB bottom or above a Bearish OB top.
Confluence: Combine the Power Rating, Equilibrium Line, and Touch Count together for the highest-quality setups.
🔶 SETTINGS REFERENCE
Displacement Multiplier: Controls how aggressive the displacement filter is. Higher values require a stronger engulfing move to validate a zone.
Bullish / Bearish OB Color: Set the fill color for each zone type.
Text Color: Controls the color of text inside the Info Panel.
Show Equilibrium Line: Toggles the midpoint line inside each block.
Power Intensity: When enabled, fill transparency scales with Power % — stronger zones appear more vivid.
Show Retest Labels: Toggles the ⇡ / ⇣ arrow labels on zone interactions.
🔶 CONCLUSION
Power Order Blocks provides a systematic way to map institutional footprint on the chart. By combining strict displacement validation with a relative power rating, live info panels, equilibrium mapping, and touch tracking, it transforms raw price action into a clear and actionable map of supply and demand imbalances — allowing traders to trade alongside the strongest market moves with precision and confidence. 指标

Strong Squeeze Signals | ProjectSyndicateStrong Squeeze Signals catches the moment a genuine volatility coil releases — and instead of treating every flat patch as a setup, it waits for a real squeeze to fire, tags the direction from momentum, and ranks the release 0–10 with a star score. A market that has been compressing for a stretch of bars — its Bollinger Band wound tightly inside its Keltner Channel — has to actually expand back out, in the direction of momentum, before a signal arms. Every setup gets a structural stop beyond the coil that just broke and fixed R-based targets, and is tracked live on a full statistics dashboard so you can see how the logic behaves on the exact symbol and timeframe you trade.
🧠 Squeeze-Release Core — the core idea. The engine measures volatility compression directly from two bands. When a Bollinger Band contracts entirely inside a Keltner Channel, the market is coiling: range is shrinking and energy is building. A signal fires on the release — the bar where the band expands back outside the channel — and the direction is set by a linear-regression momentum oscillator that measures how far price sits from a composite centreline. Momentum above zero on the release fires a long; below zero fires a short. The longer and tighter the coil before it lets go, the more it counts. Signals are evaluated on the bar's close and are fixed once that bar closes — the release does not repaint.
📈 Coil Mapping & Tightness — while a squeeze is active, the engine continuously tracks how many bars it has been compressing, the high and low extent of the coil, and how tight it became — the Bollinger half-width as a fraction of the Keltner half-width. A long coil that wound down to a very tight ratio is a loaded spring; both the duration and the tightness feed directly into the strength score. A minimum-coil filter ignores fleeting micro-squeezes, and an optional Strict Fire setting demands a confirmed expansion on the release bar rather than just the end of the coil.
🎯 Structural Stop + R-Based Targets — the stop is placed just beyond the coil that just broke, with an ATR buffer: below the coil's low for a long, above the coil's high for a short — then capped and floored by ATR so it can never balloon into a wide stop or collapse into a meaningless one. TP1, TP2, and TP3 are set at clean R multiples and default to 0.5R / 0.75R / 1.25R — a tighter, hit-rate-leaning profile out of the box, and fully adjustable to whatever reward-to-risk you prefer. Every signal plots its complete Entry / SL / TP1 / TP2 / TP3 line set, labeled price levels, and filled TP / SL zone boxes, with a result label on exit.
🎚️ Coil-Conviction Controls — two inputs set how serious a squeeze must be before its release counts: Minimum Coil Bars To Arm how long the spring must compress and Minimum Strength the 0–10 gate. Tighten them for fewer, higher-quality fires; loosen them for more frequent signals. This is your main dial for conviction versus frequency.
🧭 HTF Trend Alignment Filter — an optional higher-timeframe EMA filter blocks counter-trend fires, keeping you on the dominant side of the market: longs only above it, shorts only below. The higher-timeframe value is read without lookahead. A signal cooldown spaces out entries so a single impulsive expansion doesn't stack multiple tickets.
⭐ 0–10 Setup-Quality Score — every release is scored and labeled with 1–5 stars and a tier FORMING → WEAK → MODERATE → STRONG → VERY STRONG → ELITE across nine squeeze-native factors: coil length stored energy, coil tightness how far the band compressed inside the channel, momentum magnitude at release, momentum acceleration in the fire direction, volume confirmation, expansion-candle body and range, band-width widening on the break, higher-timeframe alignment, and RSI agreement. Treat the score as a confluence / cleanliness read for ranking and thinning setups — it describes how textbook a squeeze release is, not a guaranteed outcome. A Minimum Strength / Only Strong gate lets you display and alert on stronger setups only, while the dashboard keeps tracking every tier in the background.
📊 Live Statistics Dashboard — a non-intrusive panel tracks, in real time on your chart: the current squeeze state coiling / fired / expanded / no squeeze, live coil-bar count, the momentum reading, current status and the active trade, the last signal with its star score, total signals, win rate, closed trades, profit factor, average R per trade, best-performing direction, long vs short win rate, current and max win/loss streaks, and a TP1 / TP2 / TP3 / SL hit breakdown. These are computed live from the signals on your current symbol and timeframe — so you can judge the settings yourself rather than trusting a number printed in a description.
🎨 Clean Themed Visuals — an institutional colour palette shades each zone by direction and score: bullish coils run a teal family that deepens as the score climbs, bearish coils a red-to-magenta-to-purple family, so quality reads at a glance. The compression zone is drawn over the bars where the coil formed and labeled with FIRE plus its star score; the TP and SL zones are harmonized to the same palette. Four lighting themes drive the lines, labels, and dashboard; an optional faint background tint marks active coils, and optional state dots can sit under the chart. A Max Zone Width control caps how far the SL / TP / Entry zones extend to the right, so long trades never stretch into oversized towers across the chart.
🔔 Detailed Alerts — fires on strong long / short squeeze releases, plus squeeze-on new coil forming, squeeze-released, partial-TP, TP3, and SL events, including direction and score, formatted for manual or automated use. The minimum-strength setting can restrict alerts to higher-conviction setups.
🔧 Fully Customizable — every component is exposed: Bollinger and Keltner lengths and multipliers, the true-range toggle, minimum coil bars and Strict Fire confirmation, the 0–10 strength gate and Only-Strong filter, ATR length, the structural-stop buffer with risk cap/floor, the three R targets, level-shelf length and Max Zone Width, the HTF alignment filter, the signal cooldown, plus the full institutional box palette, all four themes, and every label, dashboard, and zone-shading option.
🎯 Why this is different — most squeeze tools just print a histogram or drop a dot when the bands let go and leave everything after that to you. This one classifies the release direction from momentum, requires a real coil rather than a momentary flat spot measuring both how long and how tightly it compressed, demands momentum, acceleration, volume, and expansion confirmation, anchors the stop to the coil that actually broke, then layers an objective 0–10 ranking and a live, on-chart statistics panel on top — so you are tuning and judging the system on real, current data instead of a marketing figure.
🚀 Where to use it — markets that coil and expand: Forex, Gold XAUUSD, indices, and crypto, on intraday and swing timeframes M10/M15/M30/H1 and up. The ATR-based stop and R targets adapt to each asset's volatility automatically.
🎯 How to trade it
Apply it to a market that produces real volatility cycles and let the dashboard populate. Read the live win rate, profit factor, and average R for your symbol and timeframe before committing — if the logic doesn't suit that market, you'll see it.
Keep the HTF Trend Alignment filter on so you only take releases in the direction of the larger trend.
Wait for a STRONG LONG FIRE / STRONG SHORT FIRE label — it marks a confirmed coil release, with the star score and Entry, SL, and TP1/2/3 already plotted.
Manage the trade with the plotted levels: with the default sub-1R targets a common approach is to bank TP1 quickly, then trail or hold the remainder toward TP2/TP3; the structural SL defines your risk on the trade. If you prefer a higher reward-to-risk profile, widen the R targets in the inputs.
Use Minimum Coil Bars and Minimum Strength to set your style — stricter for fewer, cleaner releases; looser for more activity — and use the star score and Only-Strong gate to focus on the cleanest setups.
⚠️ Important — this is a decision-support tool, not a standalone buy/sell system, and it makes no performance guarantees. Default settings were chosen on historical data and behavior will vary by symbol, timeframe, and configuration; the dashboard's statistics are historical and descriptive, not a forecast. Note the default targets are sub-1R 0.5R / 0.75R / 1.25R: tight targets tend to raise the raw hit rate while lowering the reward-to-risk on each trade, so win rate read on its own is misleading — always weigh it together with average R and profit factor, and resize the targets to your own risk profile. Signals confirm on the closed bar, so always wait for the labeled release on a closed candle. Always combine it with your own analysis and risk management, and test it on your market before trading it live. 指标

[Kpt-Ahab] Planned Order Visualizer INDThis Script visualizes planned long or short positions, including an optional existing position size, average entry price, up to three planned entries, a stop-loss level, and an estimated liquidation price. The current position can be treated either as already open or as a new planned entry. In simulation mode, all active entries are included in the calculation immediately, while in live mode only triggered price levels are included. Additional safety settings help prevent historical alerts and can optionally block entry or SL levels that would trigger immediately. The script is designed for planning, visualization, and alerting of planned positions.
**Tips**
* Use **Simulation** mode to preview how all active entries affect the average price before any live alerts are enabled.
* Use **Live** mode only when you want the script to track price-level triggers in real time.
* Keep **Trigger only in realtime** enabled when using alerts, to avoid historical alert triggers after loading the script.
* Use **Block marketable entry limits** and **Block marketable SL** to prevent levels that would trigger immediately.
* Increase the **Reset counter** only when you intentionally want to reset all triggered states and prepare a fresh setup.
* The liquidation price is an estimate for planning purposes and may differ from the exact exchange liquidation price.
This script currently uses a fixed entry structure with `E0` plus `E1`, `E2`, and `E3`. To increase the number of planned entries, duplicate the existing entry blocks and keep the same naming pattern.
For every additional entry, add:
* new input fields for active state, price, and quantity
* new submitted and triggered flags
* average price quantity/value calculations
* price-allowed and price-hit logic
* alert trigger logic
* line and label objects
* table rows if the entry should be shown in the info table 指标

Liquidity Map & Execution Cost# Liquidity Map & Execution Cost
## What this script does
LMX answers three execution questions most indicators ignore: **how expensive is it to get in and out right now, how hard would it be to move size, and where on the chart will price struggle versus travel freely.** It reads only the chart's own price and volume — no symbol is hardcoded, so it runs on any asset and any market (equities, futures, FX, crypto, indices) — and turns the answers into a plain-language trade check: liquidity state, suggested position size, order type, estimated slippage, and a colour-coded map of support, resistance, walls and open gaps.
## Why these components are combined (mashup justification)
This is not several indicators stacked together — it is one liquidity model whose parts each answer a question the others cannot, and they are designed to be read together. Removing any one leaves a specific blind spot:
1. **Cost to cross — effective spread.** Estimated with the EDGE estimator (Ardia, Guidotti & Kroencke 2024) from open/high/low/close, cross-checked against Abdi-Ranaldo (2017) and Corwin-Schultz (2012). This tells you the round-trip cost of entering, which spread-blind tools cannot show. Alone, it says nothing about moving size or about levels.
2. **Cost to move size — price impact.** The Amihud (2002) illiquidity ratio with a high-low refinement, plus a rolling Kyle (1985) lambda computed as a true regression slope. This tells you how far your own order would push price — the question that matters for sizing, and one a spread estimate cannot answer.
3. **Direction of pressure — order imbalance.** A close-location signed-volume imbalance and its persistence. This tells you which side is leaning now, adding direction that the cost measures lack.
4. **The spatial map — volume at price.** A time-decay-weighted, range-distributed volume profile that yields the Point of Control and Value Area (standard 70% method), rendered as directional zones: green support below price, red resistance above, solid = a wall price struggles at, faint = an open gap price slides through. This converts the abstract cost/impact numbers into *locations* on the chart.
5. **Anchored VWAP — fair value.** A volume-weighted average anchored to your chosen reference (last major swing by default; or session/week/month open, or the highest-volume bar), drawn as a trend-coloured line. It is the dynamic counterpart to the static profile: where the average participant is positioned, and whether price is rich or cheap versus that.
Together they form one decision: the spread and impact set the **cost and size**, the imbalance and VWAP set the **direction and fair value**, and the map sets the **location** — so the output is "trade full size with market orders, buyers in control, room to run up to the gap above," not five separate readings.
## How a reading is produced
Each estimator is normalised to a percentile of its own history so thresholds adapt to every symbol and timeframe. The inverted spread, inverted impact and depth combine into a 0–100 **Liquidity Score**, classified as Deep / Normal / Thin / Stressed (a sudden impact spike forces Stressed). The score drives the suggested size multiplier, the order-type advice and the slippage estimate. The map is rebuilt on the last bar from the volume-at-price profile.
## How to use it
- Apply to any symbol. Set the price source and, if you trade very low intraday timeframes, optionally fix the calc timeframe (e.g. Daily) so the spread estimators stay stable. On symbols without real volume the volume modules disable automatically and the score leans on the spread estimators (the panel shows "price-only").
- **Simple mode (default)** gives plain-language guidance: Liquidity, Trade cost, Pressure, Position size, Orders, Watch-out, Fair value, and a one-line verdict. **Pro mode** exposes the full readout (spread in bps, Amihud and Kyle percentiles, depth, imbalance, flow persistence, value-area levels).
- On the chart: trade toward green support, expect resistance at red, size down where the map is thin (price moves fast there), and read the trend-coloured fair-value line for rich/cheap context.
- Alerts: liquidity-state change and sudden liquidity withdrawal.
## Originality
The combination is the original contribution: a single overlay that fuses low-frequency **spread**, **impact** and **imbalance** estimators with a **time-decay, range-distributed volume profile** and an anchored fair-value line, then translates all of it into sizing/order/slippage decisions in plain language. The building blocks are public-domain methods (EDGE, Abdi-Ranaldo, Corwin-Schultz, Amihud, Kyle, volume-profile Value Area, anchored VWAP), each used for the specific job described above and cited in the script header.
## Limitations (please read)
- These are **low-frequency estimators** of quantities normally measured from quote/tick data. They approximate — they do not measure — the true spread, depth, or dealer book.
- Volume-based modules require a real volume feed; they disable on symbols without one.
- Spread estimators were validated on daily-type bars; on very fast intraday timeframes they are noisier — use the calc-timeframe option if needed.
- The on-panel statistics are computed on the loaded chart history.
- This is an analysis tool, **not financial advice.** Test before use and trade at your own risk.
指标

Institutional Order Flow Signals [PMT]Institutional Order Flow Signals applies a Gaussian Naive Bayes classifier — trained entirely within Pine Script® v6 — to cumulative volume delta divergence in order to surface, in real time, three mutually exclusive market regime states: bullish re-alignment, bearish re-alignment, and order flow divergence.
The core question this indicator addresses is distinct from threshold-crossover approaches: given the current statistical pattern of delta momentum, price/CVD divergence, and delta slope, what is the posterior probability that the market is entering — or exiting — a directional institutional order flow regime?
――――――――――――――――――――――――――――――――――――――
🔷 WHAT IT MEASURES
🔸 Cumulative Volume Delta (CVD)
CVD is the running sum of intrabar net order flow — buy volume minus sell volume — estimated via the close-position formula: bull_vol = volume × (close − low) / (high − low). The cumulative series tracks persistent institutional buying or selling pressure independently of price direction, making it a first-order proxy for directional order flow without requiring exchange-level bid/ask data.
🔸 Three Z-Score Normalised Features
Each bar, the classifier receives three inputs derived from CVD and z-score normalised for cross-instrument compatibility:
F1 — CVD Momentum : rate of change of CVD over N bars, normalised by its rolling mean and standard deviation. Encodes how rapidly buying or selling pressure is accelerating relative to its own recent baseline.
F2 — Price/CVD Divergence : price rate of change minus CVD rate of change. A large positive value signals price rising while order flow is falling — the classic institutional distribution pattern. Near-zero values indicate price and flow agreement.
F3 — CVD Slope : linear regression slope of CVD over a short window, z-score normalised. Provides a direction-of-flow signal independent of F1's momentum measure, satisfying the Naive Bayes conditional independence assumption as closely as CVD-derived features can.
🔸 Market Regime Labels
Three mutually exclusive regimes are recognised. A bullish re-alignment bar is one where both price ROC and CVD ROC are positive — institutional flow and price confirm each other to the upside. A bearish re-alignment bar is the symmetric case. A divergence bar occurs when price and order flow point in opposite directions — historically associated with regime transitions and distribution/accumulation activity.
――――――――――――――――――――――――――――――――――――――
🔷 THE CLASSIFIER
🔸 Welford Online Learning
The classifier accumulates running sufficient statistics — count, mean, and variance — for each of the nine (feature × regime) combinations using Welford's numerically stable online update. No historical arrays are stored. The model's parameters shift gradually with each new bar, making it adaptive to changing market microstructure conditions without a fixed lookback window.
🔸 Gaussian Likelihood + Bayesian Posterior
Each feature is modelled as a Gaussian distribution under each class. The joint likelihood of the current feature vector is computed by multiplying the three per-feature probability densities under the Naive Bayes independence assumption. A class prior — updated empirically from observed regime frequencies — is combined with the joint likelihood via Bayes' theorem to produce posterior probabilities P(Bull | F1,F2,F3) and P(Bear | F1,F2,F3) for the current bar. A warmup gate suppresses signals until the classifier has accumulated statistically meaningful training observations.
――――――――――――――――――――――――――――――――――――――
🔷 SIGNALS AND DISPLAY
🔸 High-Conviction Buy — P(Bull) > 85%
A long signal fires when the bull posterior clears the configurable threshold, CVD momentum confirms, and price is above the trend EMA. The threshold is surfaced on the label itself, making the confidence level explicit at every entry rather than hidden inside an opaque signal.
🔸 Bear Signal — CVD Divergence
A short signal fires when the bear posterior clears threshold and F2 is in active divergence territory — price moving up while order flow is declining, or the symmetric distribution case. CVD divergence without posterior confirmation does not produce a signal; both conditions are required simultaneously.
🔸 Bull Regime Band — CVD Aligned
A fill band anchored to the trend EMA expands when the classifier assigns high posterior probability to a sustained bullish re-alignment regime. The opacity of the band scales with the posterior — faint during low-confidence periods, saturated when the classifier considers the regime firmly established.
🔸 Info Table
Live readout displays current bull and bear posteriors, CVD direction, and training bar count. The Trained N counter confirms the classifier has completed warmup before acting on any signal.
――――――――――――――――――――――――――――――――――――――
🔷 INPUTS
Classifier Lookback — minimum training bars before signals activate. Default 100.
Entry Posterior Threshold — minimum posterior required. 0.60 permissive; 0.70 default; 0.80 high-conviction only.
CVD Momentum Period — lookback for F1 and F2 rate of change.
CVD Slope Period — regression window for F3.
Z-Score Period — normalisation window applied across all three features.
Trend EMA Period — macro filter; long signals only fire above EMA, short signals below.
――――――――――――――――――――――――――――――――――――――
🔷 REQUIREMENTS AND LIMITATIONS
The classifier requires a warmup period before signals are valid. The CVD estimator is synthetic — derived from intrabar price position, not actual bid/ask data — and introduces noise on instruments with low liquidity or wide spreads. The Naive Bayes independence assumption is partially violated because all three features are CVD-derived; the posteriors function as relative confidence scores rather than calibrated frequentist probabilities.
――――――――――――――――――――――――――――――――――――――
Built natively in Pine Script® v6. No external libraries, no data feeds, no fixed lookback arrays. The Gaussian Naive Bayes classifier trains continuously from the chart's own bar history using Welford's online algorithm. Open source — Mozilla Public License 2.0. 指标

指标

Elaris Volume Intelligence ProElaris Volume Intelligence Pro is a professional-grade volume analysis and smart money intelligence indicator designed to help traders understand market participation, hidden pressure, and potential reversal activity in real time.
Instead of displaying raw volume alone, Elaris Volume Intelligence Pro transforms market volume into actionable intelligence by combining relative volume analysis, volume delta estimation, CVD (Cumulative Volume Delta), absorption detection, climax activity, and smart flow momentum into a single clean and trader-friendly system.
The indicator is built for discretionary traders, scalpers, intraday traders, swing traders, and crypto traders who want deeper insight into market behavior beyond standard candles.
━━━━━━━━━━━━━━━━━━
FEATURES
━━━━━━━━━━━━━━━━━━
• Smart Volume Columns
Dynamically colored volume bars help identify bullish pressure, bearish pressure, climax activity, and absorption zones instantly.
• Relative Volume & Z-Score Engine
Detects abnormal market participation using relative volume and statistical volume expansion analysis.
• Volume Flow Momentum
A smoothed institutional-style flow model that helps traders identify whether aggressive buying or selling pressure is dominating the market.
• Bullish & Bearish Climax Detection
Highlights potential exhaustion candles during extreme participation and volatility conditions.
• Demand & Supply Absorption Detection
Detects high-volume compression behavior that may indicate hidden accumulation or distribution by larger participants.
• Volume & CVD Divergence Signals
Identifies possible reversal conditions when price action and cumulative volume behavior diverge.
• Smart Market State Dashboard
A clean built-in intelligence panel provides:
* Market bias
* Smart score
* Relative volume strength
* Volume Z-score
* Delta pressure
* Active signal state
• Dark Mode Optimized UI
Professionally designed visuals optimized for both dark and light TradingView themes.
• Fully Configurable
All thresholds, smoothing values, divergence sensitivity, and visual layers can be customized for different trading styles and markets.
━━━━━━━━━━━━━━━━━━
HOW TO USE
━━━━━━━━━━━━━━━━━━
• Strong Bullish Conditions
Look for:
* Bullish volume climax
* Positive flow momentum
* Increasing relative volume
* Bullish divergences
* Demand absorption
• Strong Bearish Conditions
Look for:
* Bearish climax candles
* Negative flow momentum
* High sell-side pressure
* Bearish divergences
* Supply absorption
• Best Use Cases
* Crypto futures trading
* Intraday momentum trading
* Breakout confirmation
* Reversal detection
* Smart money analysis
* Volume-based confluence systems
━━━━━━━━━━━━━━━━━━
ALERTS INCLUDED
━━━━━━━━━━━━━━━━━━
The indicator includes built-in alerts for:
* Bullish/Bearish Volume Climax
* Demand/Supply Absorption
* Bullish/Bearish Divergence
* Bullish/Bearish Pressure States
━━━━━━━━━━━━━━━━━━
IMPORTANT NOTES
━━━━━━━━━━━━━━━━━━
• This indicator does not use repainting logic.
• Signals are generated using confirmed candle data.
• Works best on liquid markets with reliable volume data.
• Designed for confirmation and confluence, not standalone financial advice.
Built by Elaris Group.
Financial intelligence for modern markets.
指标
