OPEN-SOURCE SCRIPT
SCMF Structural Candle Momentum

## Reading the SCMF Dashboard — Complete Reference
---
## The Main Panel (Chart Area)
Before the table — what you're looking at on screen:
**The histogram bars** are the core output. Each daily bar produces one histogram column. Color tells you the classification tier immediately without reading the table. Width tells you nothing — only the height (value) and color matter.
**The faint white line** running through the histogram is CMS Raw — the unpenalised score before quality gates apply. When it sits significantly higher than the histogram bar, the gates are cutting into your score. When they track closely, all gates are passing cleanly.
**The light blue filled band** around the zero line is the SQC band. Its width equals `±SQC × 0.5`. A wide band means high confidence. A narrow band means the indicator is uncertain. When a bar's histogram column sits well outside the band, the signal is strong relative to its own uncertainty.
**The thin coloured lines** are the five dimensions plotting simultaneously. You read them the same way as the histogram — above zero is bullish, below is bearish, and magnitude matters.
---
## Row 1 — CMS Adjusted
This is the single number that summarises everything. Range is `[-1.00, +1.00]`.
It is the weighted sum of all five dimensions, suppressed to `na` (no display) if SQC falls below 0.25 or if the liquidity gate fires.
**What the number means in practice:**
| Value | What the crowd actually did |
|---|---|
| `+0.80` to `+1.00` | Every dimension is bullish and aligned. Rare. Act with conviction |
| `+0.50` to `+0.79` | Strong multi-dimensional bull signal. Most reliable entry zone |
| `+0.20` to `+0.49` | Moderate bullish. One or two dimensions are pulling back |
| `+0.05` to `+0.19` | Marginal. Don't act on CMS alone at this level |
| `-0.05` to `+0.05` | Genuine standoff. No edge in either direction |
| `-0.05` to `-0.19` | Marginal bearish. Same — don't act alone |
| `-0.20` to `-0.49` | Moderate bearish. Check what dimension is driving it |
| `-0.50` to `-0.79` | Strong bear signal |
| `-0.80` to `-1.00` | Full multi-dimensional bearish alignment |
The distance from zero matters more than crossing a threshold. `+0.66` and `+0.64` are not meaningfully different despite sitting on opposite sides of the strong-bull line.
---
## Row 2 — Signal
The text classification of CMS Adjusted. Seven tiers:
```
▲ STRONG BULL CMS > 0.65
▲ MOD BULL CMS > 0.35
△ WEAK BULL CMS > 0.10
◆ NEUTRAL CMS between -0.10 and +0.10
▽ WEAK BEAR CMS < -0.10
▼ MOD BEAR CMS < -0.35
▼ STRONG BEAR CMS < -0.65
⚠ NO SIGNAL CMS is na (suppressed by SQC or liquidity gate)
```
The arrow shapes are intentional — filled triangles (▲▼) for strong/moderate, hollow (△▽) for weak, diamond (◆) for neutral. At a glance you know whether you're in a conviction zone or a noise zone.
`⚠ NO SIGNAL` is not a neutral reading. It means the quality gates have decided the data for this bar is unreliable — treat it as if the bar doesn't exist for signal purposes.
---
## Row 3 — CMS Raw
The composite score **before SQC suppression**, but after all five dimensions are computed and weighted. Range `[-1.00, +1.00]`.
**How to use it alongside CMS Adjusted:**
The gap between Raw and Adjusted tells you how much the quality gates are penalising the bar. In v1.2, CMS Adjusted = CMS Raw when SQC ≥ 0.25 (they're the same number — the only suppression now is the hard cutoff at 0.25). So the main reason these two diverge is when SQC is very close to 0.25 and the histogram shows a different shade.
More practically: if CMS Raw is `+0.71` but CMS Adjusted shows `⚠ NO SIGNAL`, it means a strong theoretical signal was killed by one of the gates — most likely liquidity (HHI abort) or a doji. Check SQC to know which gate caused it.
---
## Row 4 — SQC + Pip Bars
**The number** is the Signal Quality Coefficient — a multiplicative product of all five quality gates. Range `[0.00, 1.00]`.
**The pip bars** `████ / ███░ / ██░░ / █░░░` give you instant visual confidence:
| Pips | SQC Range | Meaning |
|---|---|---|
| `████` | > 0.75 | All gates clean. Full confidence. Treat signal at face value |
| `███░` | 0.50–0.75 | One gate is degraded. Use signal but be aware of which gate |
| `██░░` | 0.25–0.50 | Two or more gates degraded. Signal valid but reduce position size |
| `█░░░` | < 0.25 | Output suppressed — CMS Adjusted will show `⚠ NO SIGNAL` |
**How to use SQC as a position sizing input:**
Don't use it as a binary pass/fail. Use it as a scale. If your normal position size at `▲ STRONG BULL` is 100%, then at SQC `███░` run 75%, at `██░░` run 50%. The number is literally a confidence weight you can apply directly.
**What kills SQC:**
There are six multiplicative components. Any one of them going low drags the product down hard:
| Component | What lowers it | How much |
|---|---|---|
| `sqc_v` (Validity) | Not on daily/weekly timeframe, or zero volume | Drops to 0 — kills everything |
| `sqc_bvc` (BVC accuracy) | No 5m intraday data, or high HHI | 0.55–0.88 range |
| `sqc_phase` (Event trust) | Gap > 2× ATR, or structural event day | 0.50–0.80 |
| `sqc_liq` (Liquidity) | HHI high (concentration), or high Amihud rank | 0.50–1.00, or 0 if abort |
| `sqc_d` (Doji validity) | Bar range < 10% of ATR | 0.30 |
| `sqc_regi` (Regime) | Transitional regime | 0.90 |
---
## Dimensions Block — D1 through D5
Every dimension runs on the same scale: `[-1.00, +1.00]`. Positive = bullish pressure, negative = bearish pressure, zero = no signal from this dimension. The colour in the cell matches the tier — green shades for positive, grey near zero, red shades for negative.
**`—` or `no 5m data` / `no 30m data`** means the dimension couldn't compute because the required intraday data wasn't available from your broker for this ticker. The weight for that dimension is dropped and the remaining weights renormalise. This is normal behaviour for some EGX names.
---
### D1 — CPI (Close Position Index)
**The number answers:** *Where did price close within today's range?*
```
+1.00 Closed exactly at session high
+0.50 Closed in the upper quarter of range
0.00 Closed exactly at session midpoint
-0.50 Closed in the lower quarter of range
-1.00 Closed exactly at session low
```
This is the only dimension derived purely from daily OHLC — no intraday data needed. It's always available.
**Reading example:** D1 = `+0.82`. The close was 91% of the way from the session low to the session high. The crowd ended the day with strong upward pressure.
**What it cannot tell you:** It doesn't know if volume supported that close, what time of day the high was made, or whether the close was driven by informed buyers or just thin late-day drift. That's why it carries the lowest weight (0.08–0.15 depending on regime).
---
### D2 — WAM (Wick Absorption Model)
**The number answers:** *Where did the crowd get rejected, and did the other side absorb it with conviction?*
```
+1.00 Long lower wick, large body closing up — heavy selling absorbed with conviction
+0.50 Lower wick present, modest body — absorption occurred, not fully confirmed
0.00 Wicks are symmetric, or body is tiny — no absorption signal
-0.50 Upper wick present, modest body — buying attempt was absorbed
-1.00 Long upper wick, large body closing down — heavy buying absorbed with conviction
```
**Reading example:** D2 = `+0.63`. There is a meaningful lower wick and a solid body. Someone sold aggressively into a level and got absorbed by buyers who then pushed price to close well above the session low. This is a structural sign of demand at a price level.
**The most important interaction:** WAM is the key dimension for confirming D1. If D1 = `+0.82` (closed high) but D2 = `-0.40` (long upper wick, closed off highs relative to wicks) — that's tension. The close was strong but the wicks tell a different story. The divergence engine watches for exactly this.
---
### D3 — NVD (Net Volume Delta)
**The number answers:** *Across all 54 five-minute candles today, who was the net aggressor — buyers lifting offers, or sellers hitting bids?*
```
+1.00 100% of weighted volume was aggressive buying
+0.50 Buyers were the aggressor on roughly 75% of volume
0.00 Equal buy and sell aggression — genuine equilibrium
-0.50 Sellers were the aggressor on roughly 75% of volume
-1.00 100% of weighted volume was aggressive selling
```
This is the highest-weight dimension (0.25–0.40 depending on regime) because it is the closest proxy to actual order flow. It does not depend on where price closed — a stock can close at the top of its range while NVD is negative (sellers were hitting bids all day but absorption held price up).
**Reading example:** D3 = `-0.44`. Despite what the candle looks like, sellers were the net aggressors across the intraday session. That number reflects who was initiating trades, not where price ended up.
**When D3 shows `no 5m data`:** The broker doesn't provide 5-minute history for this ticker. NVD is dropped from the composite. This particularly affects thin EGX names. CMS will still compute from D1, D2, D4, D5 with renormalised weights, but loses its most informative dimension — SQC will reflect this via `sqc_bvc` penalty.
---
### D4 — TVD (Temporal Volume Distribution)
**The number answers:** *Did volume concentrate in the conviction phase (13:30–14:30), and did it point in the same direction as price moved during that window?*
```
+1.00 Conviction phase dominated total volume AND conviction-phase price rose
+0.50 Moderate conviction-phase dominance with bullish direction
0.00 Volume was evenly distributed, or conviction-phase direction was flat
-0.50 Moderate conviction-phase dominance with bearish direction
-1.00 Conviction phase dominated total volume AND conviction-phase price fell
```
**Why this matters more than raw volume:** A candle with 10 million shares traded means nothing if 8 million traded in the first 30 minutes (retail FOMO at open). The same 10 million is very different if 6 million traded between 13:30 and 14:30. Institutional rebalancing happens in the conviction window. TVD measures whether they were there and which direction they pushed.
**On event days** the weighting shifts — opening phase gets higher weight (0.80) because informed traders act at open when news has a time expiry. TVD automatically adjusts, so you don't need to do anything differently.
**Reading example:** D4 = `+0.71`. The conviction window was heavy and price moved upward during that window. Institutional positioning for tomorrow was to the buy side.
---
### D5 — PPT (Price Path Topology)
**The number answers:** *Did the 30-minute closes trace a consistent directional path, and did the pace accelerate or decelerate toward the end?*
```
+1.00 Monotonic grind upward all day, accelerating into the close
+0.50 Mostly directional with some pullbacks, no strong acceleration signal
0.00 Oscillating path that happened to close up/down — no conviction in the journey
-0.50 Mostly directional downward with some bounces
-1.00 Monotonic grind downward all day, accelerating into the close
```
PPT has two sub-components you can think about separately:
**Path Monotonicity** — what fraction of 30-minute steps pointed in the final direction. A day where 8 of 8 steps went up is different from a day where price went up, down, up, up, down, up, up, up and happened to close up.
**Momentum Acceleration** — did the second half of the session move faster than the first half? Positive acceleration (slow start, fast finish) is institutionally consistent. Deceleration (fast start, slow finish) is exhaustion.
**Reading example:** D5 = `-0.28`. Even though the daily close might look fine, the intraday path decelerated toward the end and had inconsistent step direction. The crowd moved without conviction today. Don't trust tomorrow's follow-through.
**The most useful divergence from D5:** When CMS is strongly positive but D5 is negative — this is the Exhaustion pattern (EX flag). The candle looks great, the crowd was net bullish today, but the path tells you energy is fading. Often appears one to two bars before a reversal.
---
## Context Block
### Regime
Three states, driven by ADX and ATR ratio:
| State | ADX | ATR/SMA(ATR) | Meaning for the indicator |
|---|---|---|---|
| `TRENDING` | > 25 | > 1.0 | NVD and TVD weights are elevated. Institutional order flow dominates price action. CMS is most reliable here |
| `RANGING` | < 20 | < 0.8 | WAM and CPI weights are elevated. Absorption at extremes and close position matter more than delta. Watch for mean-reversion signals |
| `TRANSITIONAL` | Between | Between | Default weights apply. SQC gets a 0.90 modifier — slight confidence reduction because regime is ambiguous |
Regime is critical context for interpreting the signal tier. A `▲ MOD BULL` in `TRENDING` regime with high NVD is a different trade from `▲ MOD BULL` in `RANGING` regime driven by WAM — the first is trend continuation, the second is a bounce candidate.
---
### Event Day
**`No`** — Normal session. Phase weights are standard (opening=0.0, discovery=0.50, conviction=1.00). Informed trading expected at close.
**`▲ YES`** — Either the opening gap exceeded 1× ATR, or the opening 30-minute window had more than 2.5× its 20-day average volume. Phase weights have shifted (opening=0.80, discovery=0.45, conviction=0.35). Informed traders may have front-loaded into the opening on time-sensitive news. SQC is reduced to 0.80 for this bar. If the gap exceeded 2× ATR, SQC drops further to 0.50 and the bar should be treated as structurally unreliable for momentum signals.
On event days: D4 (TVD) is the most affected dimension — its output is driven by dynamically reweighted phases. D3 (NVD) is unaffected since it reads raw order flow regardless of when it happened. Trust D3 and D1 more than D4 and D5 on event days.
---
### Divergence
Shows the active divergence pattern for the current bar. Only one shows at a time (priority order: HD → HA → EX → CM). On the chart these appear as plotshapes directly on the indicator panel.
**`None`** — Dimensions are broadly consistent with the CMS direction. Signal is clean.
**`Hidden Dist` (HD ▼)** — Hidden Distribution. D1 (close) is positive (`> +0.35`) but D3 (NVD) is negative (`< -0.25`) and D4 (TVD) is negative (`< -0.15`). The candle *looks* bullish but the crowd was net selling all day and institutional volume was bearish. Classic smart-money distribution pattern. In a topping market this is the most dangerous candle type — price is being marked up while size is being sold into retail buyers.
**`Hidden Accum` (HA ▲)** — Hidden Accumulation. D1 (close) is negative (`< -0.35`) but D3 (NVD) is positive (`> +0.25`) and D2 (WAM) is positive (`> +0.15`). The candle looks bearish but buyers absorbed all supply and the lower wick confirms a defended level. Smart money is building a position at a discount.
**`Exhaustion` (EX ✕)** — D1 is positive (`> +0.35`) but D5 (PPT) decelerated (`< -0.15`) and D4 conviction-phase volume was absent (`< +0.10`). Strong close, but the path slowed and institutional participation faded late. Not a reversal signal by itself — more a momentum quality warning. Often precedes a flat or weak next session rather than a sharp reversal.
**`Conv Mismatch` (CM ○)** — D3 (NVD) is strongly positive (`> +0.35`) but D4 (TVD) is negative (`< -0.20`). There was aggressive net buying throughout the day, but it happened in the opening phase (retail FOMO), not the conviction phase. Institutional traders were not the buyers. High risk of next-session mean reversion as the weak holders unwind.
---
## The Complete Reading Process — Step by Step
When you open the chart at end of day, read in this order:
**Step 1 — SQC first.** If `█░░░` or `⚠ NO SIGNAL`, stop. The bar is not usable for signals today.
**Step 2 — Regime.** Sets the interpretive frame. Are you looking for trend continuation (TRENDING) or mean reversion (RANGING)?
**Step 3 — Event Day.** If YES, discount D4 and D5 slightly, trust D3 and D1 more.
**Step 4 — CMS Adjusted and Signal tier.** Is this a conviction zone (> ±0.35) or noise (< ±0.10)?
**Step 5 — Divergence.** Does the signal have internal conflict? Hidden Distribution on a `▲ MOD BULL` = danger. Hidden Accumulation on a `▼ MOD BEAR` = potential entry.
**Step 6 — Dimension breakdown.** Which dimensions are driving the CMS? A `+0.58` driven by D3 `+0.80` and D4 `+0.75` (both intraday-dependent dimensions) is much stronger than `+0.58` driven only by D1 `+0.90` and D2 `+0.60` (daily OHLC only) with D3/D4/D5 all near zero.
**Step 7 — CMS Raw vs Adjusted gap.** If they are the same, all gates passed cleanly. If Raw is significantly higher, something penalised the bar — usually a gate between 0.25 and 0.75 SQC.
---
## The Main Panel (Chart Area)
Before the table — what you're looking at on screen:
**The histogram bars** are the core output. Each daily bar produces one histogram column. Color tells you the classification tier immediately without reading the table. Width tells you nothing — only the height (value) and color matter.
**The faint white line** running through the histogram is CMS Raw — the unpenalised score before quality gates apply. When it sits significantly higher than the histogram bar, the gates are cutting into your score. When they track closely, all gates are passing cleanly.
**The light blue filled band** around the zero line is the SQC band. Its width equals `±SQC × 0.5`. A wide band means high confidence. A narrow band means the indicator is uncertain. When a bar's histogram column sits well outside the band, the signal is strong relative to its own uncertainty.
**The thin coloured lines** are the five dimensions plotting simultaneously. You read them the same way as the histogram — above zero is bullish, below is bearish, and magnitude matters.
---
## Row 1 — CMS Adjusted
This is the single number that summarises everything. Range is `[-1.00, +1.00]`.
It is the weighted sum of all five dimensions, suppressed to `na` (no display) if SQC falls below 0.25 or if the liquidity gate fires.
**What the number means in practice:**
| Value | What the crowd actually did |
|---|---|
| `+0.80` to `+1.00` | Every dimension is bullish and aligned. Rare. Act with conviction |
| `+0.50` to `+0.79` | Strong multi-dimensional bull signal. Most reliable entry zone |
| `+0.20` to `+0.49` | Moderate bullish. One or two dimensions are pulling back |
| `+0.05` to `+0.19` | Marginal. Don't act on CMS alone at this level |
| `-0.05` to `+0.05` | Genuine standoff. No edge in either direction |
| `-0.05` to `-0.19` | Marginal bearish. Same — don't act alone |
| `-0.20` to `-0.49` | Moderate bearish. Check what dimension is driving it |
| `-0.50` to `-0.79` | Strong bear signal |
| `-0.80` to `-1.00` | Full multi-dimensional bearish alignment |
The distance from zero matters more than crossing a threshold. `+0.66` and `+0.64` are not meaningfully different despite sitting on opposite sides of the strong-bull line.
---
## Row 2 — Signal
The text classification of CMS Adjusted. Seven tiers:
```
▲ STRONG BULL CMS > 0.65
▲ MOD BULL CMS > 0.35
△ WEAK BULL CMS > 0.10
◆ NEUTRAL CMS between -0.10 and +0.10
▽ WEAK BEAR CMS < -0.10
▼ MOD BEAR CMS < -0.35
▼ STRONG BEAR CMS < -0.65
⚠ NO SIGNAL CMS is na (suppressed by SQC or liquidity gate)
```
The arrow shapes are intentional — filled triangles (▲▼) for strong/moderate, hollow (△▽) for weak, diamond (◆) for neutral. At a glance you know whether you're in a conviction zone or a noise zone.
`⚠ NO SIGNAL` is not a neutral reading. It means the quality gates have decided the data for this bar is unreliable — treat it as if the bar doesn't exist for signal purposes.
---
## Row 3 — CMS Raw
The composite score **before SQC suppression**, but after all five dimensions are computed and weighted. Range `[-1.00, +1.00]`.
**How to use it alongside CMS Adjusted:**
The gap between Raw and Adjusted tells you how much the quality gates are penalising the bar. In v1.2, CMS Adjusted = CMS Raw when SQC ≥ 0.25 (they're the same number — the only suppression now is the hard cutoff at 0.25). So the main reason these two diverge is when SQC is very close to 0.25 and the histogram shows a different shade.
More practically: if CMS Raw is `+0.71` but CMS Adjusted shows `⚠ NO SIGNAL`, it means a strong theoretical signal was killed by one of the gates — most likely liquidity (HHI abort) or a doji. Check SQC to know which gate caused it.
---
## Row 4 — SQC + Pip Bars
**The number** is the Signal Quality Coefficient — a multiplicative product of all five quality gates. Range `[0.00, 1.00]`.
**The pip bars** `████ / ███░ / ██░░ / █░░░` give you instant visual confidence:
| Pips | SQC Range | Meaning |
|---|---|---|
| `████` | > 0.75 | All gates clean. Full confidence. Treat signal at face value |
| `███░` | 0.50–0.75 | One gate is degraded. Use signal but be aware of which gate |
| `██░░` | 0.25–0.50 | Two or more gates degraded. Signal valid but reduce position size |
| `█░░░` | < 0.25 | Output suppressed — CMS Adjusted will show `⚠ NO SIGNAL` |
**How to use SQC as a position sizing input:**
Don't use it as a binary pass/fail. Use it as a scale. If your normal position size at `▲ STRONG BULL` is 100%, then at SQC `███░` run 75%, at `██░░` run 50%. The number is literally a confidence weight you can apply directly.
**What kills SQC:**
There are six multiplicative components. Any one of them going low drags the product down hard:
| Component | What lowers it | How much |
|---|---|---|
| `sqc_v` (Validity) | Not on daily/weekly timeframe, or zero volume | Drops to 0 — kills everything |
| `sqc_bvc` (BVC accuracy) | No 5m intraday data, or high HHI | 0.55–0.88 range |
| `sqc_phase` (Event trust) | Gap > 2× ATR, or structural event day | 0.50–0.80 |
| `sqc_liq` (Liquidity) | HHI high (concentration), or high Amihud rank | 0.50–1.00, or 0 if abort |
| `sqc_d` (Doji validity) | Bar range < 10% of ATR | 0.30 |
| `sqc_regi` (Regime) | Transitional regime | 0.90 |
---
## Dimensions Block — D1 through D5
Every dimension runs on the same scale: `[-1.00, +1.00]`. Positive = bullish pressure, negative = bearish pressure, zero = no signal from this dimension. The colour in the cell matches the tier — green shades for positive, grey near zero, red shades for negative.
**`—` or `no 5m data` / `no 30m data`** means the dimension couldn't compute because the required intraday data wasn't available from your broker for this ticker. The weight for that dimension is dropped and the remaining weights renormalise. This is normal behaviour for some EGX names.
---
### D1 — CPI (Close Position Index)
**The number answers:** *Where did price close within today's range?*
```
+1.00 Closed exactly at session high
+0.50 Closed in the upper quarter of range
0.00 Closed exactly at session midpoint
-0.50 Closed in the lower quarter of range
-1.00 Closed exactly at session low
```
This is the only dimension derived purely from daily OHLC — no intraday data needed. It's always available.
**Reading example:** D1 = `+0.82`. The close was 91% of the way from the session low to the session high. The crowd ended the day with strong upward pressure.
**What it cannot tell you:** It doesn't know if volume supported that close, what time of day the high was made, or whether the close was driven by informed buyers or just thin late-day drift. That's why it carries the lowest weight (0.08–0.15 depending on regime).
---
### D2 — WAM (Wick Absorption Model)
**The number answers:** *Where did the crowd get rejected, and did the other side absorb it with conviction?*
```
+1.00 Long lower wick, large body closing up — heavy selling absorbed with conviction
+0.50 Lower wick present, modest body — absorption occurred, not fully confirmed
0.00 Wicks are symmetric, or body is tiny — no absorption signal
-0.50 Upper wick present, modest body — buying attempt was absorbed
-1.00 Long upper wick, large body closing down — heavy buying absorbed with conviction
```
**Reading example:** D2 = `+0.63`. There is a meaningful lower wick and a solid body. Someone sold aggressively into a level and got absorbed by buyers who then pushed price to close well above the session low. This is a structural sign of demand at a price level.
**The most important interaction:** WAM is the key dimension for confirming D1. If D1 = `+0.82` (closed high) but D2 = `-0.40` (long upper wick, closed off highs relative to wicks) — that's tension. The close was strong but the wicks tell a different story. The divergence engine watches for exactly this.
---
### D3 — NVD (Net Volume Delta)
**The number answers:** *Across all 54 five-minute candles today, who was the net aggressor — buyers lifting offers, or sellers hitting bids?*
```
+1.00 100% of weighted volume was aggressive buying
+0.50 Buyers were the aggressor on roughly 75% of volume
0.00 Equal buy and sell aggression — genuine equilibrium
-0.50 Sellers were the aggressor on roughly 75% of volume
-1.00 100% of weighted volume was aggressive selling
```
This is the highest-weight dimension (0.25–0.40 depending on regime) because it is the closest proxy to actual order flow. It does not depend on where price closed — a stock can close at the top of its range while NVD is negative (sellers were hitting bids all day but absorption held price up).
**Reading example:** D3 = `-0.44`. Despite what the candle looks like, sellers were the net aggressors across the intraday session. That number reflects who was initiating trades, not where price ended up.
**When D3 shows `no 5m data`:** The broker doesn't provide 5-minute history for this ticker. NVD is dropped from the composite. This particularly affects thin EGX names. CMS will still compute from D1, D2, D4, D5 with renormalised weights, but loses its most informative dimension — SQC will reflect this via `sqc_bvc` penalty.
---
### D4 — TVD (Temporal Volume Distribution)
**The number answers:** *Did volume concentrate in the conviction phase (13:30–14:30), and did it point in the same direction as price moved during that window?*
```
+1.00 Conviction phase dominated total volume AND conviction-phase price rose
+0.50 Moderate conviction-phase dominance with bullish direction
0.00 Volume was evenly distributed, or conviction-phase direction was flat
-0.50 Moderate conviction-phase dominance with bearish direction
-1.00 Conviction phase dominated total volume AND conviction-phase price fell
```
**Why this matters more than raw volume:** A candle with 10 million shares traded means nothing if 8 million traded in the first 30 minutes (retail FOMO at open). The same 10 million is very different if 6 million traded between 13:30 and 14:30. Institutional rebalancing happens in the conviction window. TVD measures whether they were there and which direction they pushed.
**On event days** the weighting shifts — opening phase gets higher weight (0.80) because informed traders act at open when news has a time expiry. TVD automatically adjusts, so you don't need to do anything differently.
**Reading example:** D4 = `+0.71`. The conviction window was heavy and price moved upward during that window. Institutional positioning for tomorrow was to the buy side.
---
### D5 — PPT (Price Path Topology)
**The number answers:** *Did the 30-minute closes trace a consistent directional path, and did the pace accelerate or decelerate toward the end?*
```
+1.00 Monotonic grind upward all day, accelerating into the close
+0.50 Mostly directional with some pullbacks, no strong acceleration signal
0.00 Oscillating path that happened to close up/down — no conviction in the journey
-0.50 Mostly directional downward with some bounces
-1.00 Monotonic grind downward all day, accelerating into the close
```
PPT has two sub-components you can think about separately:
**Path Monotonicity** — what fraction of 30-minute steps pointed in the final direction. A day where 8 of 8 steps went up is different from a day where price went up, down, up, up, down, up, up, up and happened to close up.
**Momentum Acceleration** — did the second half of the session move faster than the first half? Positive acceleration (slow start, fast finish) is institutionally consistent. Deceleration (fast start, slow finish) is exhaustion.
**Reading example:** D5 = `-0.28`. Even though the daily close might look fine, the intraday path decelerated toward the end and had inconsistent step direction. The crowd moved without conviction today. Don't trust tomorrow's follow-through.
**The most useful divergence from D5:** When CMS is strongly positive but D5 is negative — this is the Exhaustion pattern (EX flag). The candle looks great, the crowd was net bullish today, but the path tells you energy is fading. Often appears one to two bars before a reversal.
---
## Context Block
### Regime
Three states, driven by ADX and ATR ratio:
| State | ADX | ATR/SMA(ATR) | Meaning for the indicator |
|---|---|---|---|
| `TRENDING` | > 25 | > 1.0 | NVD and TVD weights are elevated. Institutional order flow dominates price action. CMS is most reliable here |
| `RANGING` | < 20 | < 0.8 | WAM and CPI weights are elevated. Absorption at extremes and close position matter more than delta. Watch for mean-reversion signals |
| `TRANSITIONAL` | Between | Between | Default weights apply. SQC gets a 0.90 modifier — slight confidence reduction because regime is ambiguous |
Regime is critical context for interpreting the signal tier. A `▲ MOD BULL` in `TRENDING` regime with high NVD is a different trade from `▲ MOD BULL` in `RANGING` regime driven by WAM — the first is trend continuation, the second is a bounce candidate.
---
### Event Day
**`No`** — Normal session. Phase weights are standard (opening=0.0, discovery=0.50, conviction=1.00). Informed trading expected at close.
**`▲ YES`** — Either the opening gap exceeded 1× ATR, or the opening 30-minute window had more than 2.5× its 20-day average volume. Phase weights have shifted (opening=0.80, discovery=0.45, conviction=0.35). Informed traders may have front-loaded into the opening on time-sensitive news. SQC is reduced to 0.80 for this bar. If the gap exceeded 2× ATR, SQC drops further to 0.50 and the bar should be treated as structurally unreliable for momentum signals.
On event days: D4 (TVD) is the most affected dimension — its output is driven by dynamically reweighted phases. D3 (NVD) is unaffected since it reads raw order flow regardless of when it happened. Trust D3 and D1 more than D4 and D5 on event days.
---
### Divergence
Shows the active divergence pattern for the current bar. Only one shows at a time (priority order: HD → HA → EX → CM). On the chart these appear as plotshapes directly on the indicator panel.
**`None`** — Dimensions are broadly consistent with the CMS direction. Signal is clean.
**`Hidden Dist` (HD ▼)** — Hidden Distribution. D1 (close) is positive (`> +0.35`) but D3 (NVD) is negative (`< -0.25`) and D4 (TVD) is negative (`< -0.15`). The candle *looks* bullish but the crowd was net selling all day and institutional volume was bearish. Classic smart-money distribution pattern. In a topping market this is the most dangerous candle type — price is being marked up while size is being sold into retail buyers.
**`Hidden Accum` (HA ▲)** — Hidden Accumulation. D1 (close) is negative (`< -0.35`) but D3 (NVD) is positive (`> +0.25`) and D2 (WAM) is positive (`> +0.15`). The candle looks bearish but buyers absorbed all supply and the lower wick confirms a defended level. Smart money is building a position at a discount.
**`Exhaustion` (EX ✕)** — D1 is positive (`> +0.35`) but D5 (PPT) decelerated (`< -0.15`) and D4 conviction-phase volume was absent (`< +0.10`). Strong close, but the path slowed and institutional participation faded late. Not a reversal signal by itself — more a momentum quality warning. Often precedes a flat or weak next session rather than a sharp reversal.
**`Conv Mismatch` (CM ○)** — D3 (NVD) is strongly positive (`> +0.35`) but D4 (TVD) is negative (`< -0.20`). There was aggressive net buying throughout the day, but it happened in the opening phase (retail FOMO), not the conviction phase. Institutional traders were not the buyers. High risk of next-session mean reversion as the weak holders unwind.
---
## The Complete Reading Process — Step by Step
When you open the chart at end of day, read in this order:
**Step 1 — SQC first.** If `█░░░` or `⚠ NO SIGNAL`, stop. The bar is not usable for signals today.
**Step 2 — Regime.** Sets the interpretive frame. Are you looking for trend continuation (TRENDING) or mean reversion (RANGING)?
**Step 3 — Event Day.** If YES, discount D4 and D5 slightly, trust D3 and D1 more.
**Step 4 — CMS Adjusted and Signal tier.** Is this a conviction zone (> ±0.35) or noise (< ±0.10)?
**Step 5 — Divergence.** Does the signal have internal conflict? Hidden Distribution on a `▲ MOD BULL` = danger. Hidden Accumulation on a `▼ MOD BEAR` = potential entry.
**Step 6 — Dimension breakdown.** Which dimensions are driving the CMS? A `+0.58` driven by D3 `+0.80` and D4 `+0.75` (both intraday-dependent dimensions) is much stronger than `+0.58` driven only by D1 `+0.90` and D2 `+0.60` (daily OHLC only) with D3/D4/D5 all near zero.
**Step 7 — CMS Raw vs Adjusted gap.** If they are the same, all gates passed cleanly. If Raw is significantly higher, something penalised the bar — usually a gate between 0.25 and 0.75 SQC.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。