OPEN-SOURCE SCRIPT

Market Structure Volume Time Velocity Profile

92
This is the Market Structure Volume Time Velocity Profile (MSVTVP). It combines event-based profiling with advanced metrics like Time and Velocity (Flow Rate). Instead of fixed time periods, profiles are anchored to critical market events (Swings, Structure Breaks, Delta Breaks), giving you a precise view of value development during specific market phases.

## The 3 Dimensions of the Market

Unlike standard tools that only show Volume, MSVTVP allows you
to switch between three critical metrics:

1. **VOLUME Profile (The "Where"):**
* Shows standard acceptance. High volume nodes (HVN)
are magnets for price.

2. **TIME Profile (The "How Long"):**
* Similar to TPO, it measures how long price spent at each
level.
* **High Time:** True acceptance and fair value.
* **Low Time:** Rejection or rapid movement.

3. **VELOCITY Profile (The "How Fast"):**
* Measures the **speed of trading** (Contracts per Second).
This reveals the hidden intent of market participants.
* **High Velocity (Fast Flow):** Aggression. Initiative
buyers/sellers are hitting market orders rapidly. Often
seen at breakouts or in liquidity vacu.
* **Low Velocity (Slow Flow):** Absorption. Massive passive
limit orders are slowing price down despite high volume.
Often seen at major reversals ("hitting a brick wall").

Key Features:

1. **Event-Based Profile Anchoring:** The indicator starts a new
profile based on one of three user-selected events
('Profile Anchor'):
- **Swing:** A new profile begins when the 'impulse baseline'
(derived from intra-bar delta) changes. This baseline
adjusts when a new **price pivot** is confirmed: When a
price **high** forms, the baseline moves to the **lower**
of its previous level or the peak delta (max of
delta O/C) at the pivot. When a price **low** forms, it
moves to the **higher** of its previous level or the
trough delta (min of delta O/C) at the pivot.
- **Structure:** A new profile begins immediately on the bar
that *confirms* a market structure break (e.g., a new HH
or LL, based on a sequence of price pivots).
- **Delta:** A new profile begins immediately on the bar
that *confirms* a break in the *cumulative delta's*
market structure (e.g., a new HH or LL in the delta).
Both 'Swing' and 'Delta' anchors are derived from the same
**continuous (non-resetting) Cumulative Volume Profile Delta (CVPD)**,
which is built from the intra-bar statistical analysis.

2. **Statistical Profile Engine:** For each bar in the anchored
period, the indicator builds a volume profile on a lower
'Intra-Bar Timeframe'. Instead of simple tick counting, it
uses advanced statistical models:
- **Allocation ('Allot model'):** 'PDF' (Probability Density
Function) distributes volume proportionally across the
bar's range based on an assumed statistical model
(e.g., T4-Skew). 'Classic' assigns all volume to
the close.
- **Buy/Sell Split ('Volume Estimator'):** 'Dynamic'
applies a model that analyzes candle wicks and
recent trend to estimate buy/sell pressure. 'Classic'
classifies all volume based on the candle color.

3. **Visualization & Lag:** The indicator plots the final
profile (as a polygon) and the developing statistical
lines (POC, VA, VWAP, StdDev).
- **Note on Lag:** All anchor events require `Pivot Right Bars`
for confirmation.
- In 'Structure' and 'Delta' mode, the developing lines
(POC, VA, etc.) are plotted using a **non-repainting**
method (showing the value from `pivRi` bars ago).
- In 'Swing' mode, the profile is plotted **retroactively**,
starting *from the bar where the pivot occurred*. The
developing lines are also plotted with this full
`pivRi` lag to align with the past data.

4. **Flexible Display Modes:** The finalized profile can be displayed
in three ways: 'Up/Down' (buy vs. sell), 'Total' (combined
volume), and 'Delta' (net difference).

5. **Dynamic Row Sizing:** Includes an option ('Rows per Percent')
to automatically adjust the number of profile rows (buckets)
based on the profile's price range.

6. **Integrated Alerts:** Includes 13 alerts that trigger for:
- A new profile reset ('Profile was resetted').
- Price crossing any of the 6 developing levels (POC,
VA High/Low, VWAP, StdDev High/Low).
- **Alert Lag Assumption:** In 'Swing' mode, alerts are
delayed to match the retroactively plotted lines.
In 'Structure' and 'Delta' modes, alerts fire in
**real-time** based on the *current price* crossing
the *current (repainting)* value of the metric, which
may **differ from the non-repainting plotted line.**

**Caution: Real-Time Data Behavior (Intra-Bar Repainting)**
This indicator uses high-resolution intra-bar data. As a result, the
values on the **current, unclosed bar** (the real-time bar) will
update dynamically as new intra-bar data arrives. This includes
the values used for real-time alerts in 'Structure' and
'Delta' modes.

---

**DISCLAIMER**

1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.

2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.

3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.

4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.

5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.

Wyłączenie odpowiedzialności

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.